aboutsummaryrefslogtreecommitdiffstats
path: root/src/kube2msb/vendor/k8s.io/kubernetes
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-09-04 19:33:48 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-09-04 19:34:03 +0800
commitc4a34b2fe6f7317bf17fa478a734e5bdab30c278 (patch)
tree8b65034b069a657f2531137b389a0c1d4919b79a /src/kube2msb/vendor/k8s.io/kubernetes
parentcc0c6e3ed8fc6c9fd96ef843b866070f52537185 (diff)
Use maven to build kube2msb
Issue-Id: OOM-61 Change-Id: Ic7e733c95e28b75b66535b343ae22c893db24531 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'src/kube2msb/vendor/k8s.io/kubernetes')
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/LICENSE202
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/OWNERS6
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/context.go121
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/conversion.go160
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go2950
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/doc.go24
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go238
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go18
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go456
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/field_constants.go38
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/generate.go64
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/helpers.go502
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/install/install.go251
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/mapper.go60
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta.go129
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go72
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/help.go134
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go180
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go567
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go30
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go200
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go173
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go520
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/node_example.json49
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod/util.go61
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod_example.json102
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/ref.go130
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/register.go115
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json82
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go115
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go298
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go46
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto93
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/math.go327
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go777
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go284
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go95
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go198
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go209
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go28
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/util.go68
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.generated.go59756
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.go2891
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go288
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go47
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go4212
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto377
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go287
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go154
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go62
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go25
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go160
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go85
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go460
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go208
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go74
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go30
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go48
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go579
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go6820
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go2924
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go301
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go21
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go34797
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto2935
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go85
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/register.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go60001
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.go3329
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go1742
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/events.go45
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/name.go66
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go370
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go3193
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go346
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/types.go52
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/deep_copy_generated.go111
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go125
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go54
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.generated.go1634
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion.go118
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion_generated.go156
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/deep_copy_generated.go118
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/defaults.go46
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.pb.go969
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto102
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/register.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.generated.go1664
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go71
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/deep_copy_generated.go86
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/install/install.go123
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/register.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.generated.go1265
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.go61
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion.go30
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go143
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go86
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/defaults.go25
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/register.go44
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go1321
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.go63
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/deep_copy_generated.go149
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go128
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.generated.go2570
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go124
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go30
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion_generated.go333
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/deep_copy_generated.go149
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go25
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go48
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go2710
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go123
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go118
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/deep_copy_generated.go149
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go129
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go54
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.generated.go2659
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go120
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion_generated.go300
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/deep_copy_generated.go150
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go34
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go1612
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto131
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go47
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go2659
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go122
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go117
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/deep_copy_generated.go258
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go137
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go56
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.generated.go4671
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go244
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go106
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion_generated.go330
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/deep_copy_generated.go197
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go42
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go1901
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto177
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go47
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go3184
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go186
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go114
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go116
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion_generated.go573
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/deep_copy_generated.go298
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go49
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go3018
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto254
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go5310
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go283
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go178
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/deep_copy_generated.go120
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go131
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go57
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.generated.go1963
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go85
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.go23
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion_generated.go237
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/deep_copy_generated.go121
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go1192
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto86
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/register.go62
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go1963
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go85
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go70
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/deep_copy_generated.go299
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/helpers.go97
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go129
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/register.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go9703
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go621
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/conversion_generated.go182
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go110
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go114
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/register.go40
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go141
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/deep_copy_generated.go859
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go132
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go79
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.generated.go17991
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go901
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go404
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go2539
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/deep_copy_generated.go1170
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go167
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go22
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go13005
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto1010
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go69
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go23939
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go1198
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go740
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go90
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go129
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go52
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go1440
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go71
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go183
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go91
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go23
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go903
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto77
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go1440
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go72
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go70
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go241
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go130
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go64
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go178
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go536
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go238
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go21
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go2209
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto159
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go52
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go4327
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go165
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go138
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/user.go65
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go18
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/delta_fifo.go613
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/doc.go24
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go208
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go54
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fake_custom_store.go102
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fifo.go321
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/index.go82
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go672
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go86
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go423
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/store.go240
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/thread_safe_store.go288
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/undelta_store.go83
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/metrics/metrics.go67
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go224
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go328
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go73
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go1086
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go93
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go107
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go88
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/cache.go88
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/config.go84
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go337
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go140
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go317
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/apps.go76
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go125
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/autoscaling.go77
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/batch.go107
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificates.go86
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificatesigningrequests.go104
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/client.go179
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers.go183
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.go54
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go43
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go152
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go231
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go40
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.go145
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go91
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go411
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go472
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.go37
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go585
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go122
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.go198
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go270
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterrolebindings.go92
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterroles.go92
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/componentstatuses.go60
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/conditions.go240
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/configmap.go122
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/containerinfo.go123
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/daemon_sets.go100
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/deployment.go111
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/doc.go57
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/endpoints.go101
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/events.go219
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/extensions.go131
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/flags.go31
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go273
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/horizontalpodautoscaler.go103
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/import_known_versions.go41
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/ingress.go100
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/jobs.go167
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/limit_ranges.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/namespaces.go116
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/network_policys.go92
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/nodes.go111
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumeclaim.go99
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumes.go93
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pet_sets.go100
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_disruption_budgets.go100
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_templates.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pods.go115
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/podsecuritypolicy.go111
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/policy.go76
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rbac.go96
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replica_sets.go100
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replication_controllers.go99
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/resource_quotas.go102
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rolebindings.go95
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/roles.go95
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scale.go77
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scheduledjobs.go103
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/secrets.go120
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/service_accounts.go120
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/services.go121
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/thirdpartyresources.go98
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/util.go79
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/controller.go326
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/doc.go18
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/fake_controller_source.go262
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/shared_informer.go383
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS5
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/cloner.go237
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/converter.go951
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go36
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/doc.go24
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/helper.go39
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert.go188
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/fields.go62
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/selector.go247
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go25
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy.go66
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos.go140
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/types.go29
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/labels.go71
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/selector.go810
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go40
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS5
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec.go198
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/conversion.go98
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/deep_copy_generated.go63
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/doc.go45
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/embedded.go136
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/error.go102
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/extension.go48
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go689
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto124
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/helper.go212
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go217
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/register.go66
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go623
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go364
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go243
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go61
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.go57
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go18
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go433
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.go52
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/recognizer.go127
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming.go137
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go275
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator.go262
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types.go514
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types_proto.go69
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/unstructured.go199
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/doc.go18
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go35
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/uid.go22
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/unix_user_id.go23
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/clock.go218
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/crypto/crypto.go190
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go18
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go156
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff.go149
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle.go116
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/framer/framer.go167
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/hash/hash.go37
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/homedir/homedir.go40
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/integer/integer.go67
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.pb.go347
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.proto42
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/intstr.go147
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/json/json.go107
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/line_delimiter.go63
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/logs.go61
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/http.go235
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/interface.go278
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go108
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_split.go77
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/README.md17
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go119
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/util.go36
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go54
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/rand/rand.go83
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_linux.go49
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_unsupported.go31
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runner.go58
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go94
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go194
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go20
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/empty.go23
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int.go194
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go194
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/string.go194
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/string_flag.go56
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/template.go48
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/trace.go72
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/umask.go27
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/umask_windows.go27
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/util.go147
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/uuid.go42
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go228
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/path.go91
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/validation.go306
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go268
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go247
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/base.go59
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/semver.go50
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/version.go76
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/doc.go19
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/filter.go109
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/mux.go257
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher.go119
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/until.go82
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/decoder.go71
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/encoder.go51
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.pb.go342
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.proto43
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/register.go84
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/types.go37
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/watch.go137
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go106
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS2
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go270
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go23
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE27
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS22
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/reflect/deep_equal.go388
-rw-r--r--src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/reflect/type.go91
471 files changed, 370501 insertions, 0 deletions
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/LICENSE b/src/kube2msb/vendor/k8s.io/kubernetes/LICENSE
new file mode 100644
index 0000000..00b2401
--- /dev/null
+++ b/src/kube2msb/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 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.
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/OWNERS b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/OWNERS
new file mode 100644
index 0000000..d28472e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/OWNERS
@@ -0,0 +1,6 @@
+assignees:
+ - bgrant0607
+ - erictune
+ - lavalamp
+ - smarterclayton
+ - thockin
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/context.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/context.go
new file mode 100644
index 0000000..096144b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/context.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 api
+
+import (
+ stderrs "errors"
+ "time"
+
+ "golang.org/x/net/context"
+ "k8s.io/kubernetes/pkg/auth/user"
+)
+
+// Context carries values across API boundaries.
+// This context matches the context.Context interface
+// (https://blog.golang.org/context), for the purposes
+// of passing the api.Context through to the storage tier.
+// TODO: Determine the extent that this abstraction+interface
+// is used by the api, and whether we can remove.
+type Context interface {
+ // Value returns the value associated with key or nil if none.
+ Value(key interface{}) interface{}
+
+ // Deadline returns the time when this Context will be canceled, if any.
+ Deadline() (deadline time.Time, ok bool)
+
+ // Done returns a channel that is closed when this Context is canceled
+ // or times out.
+ Done() <-chan struct{}
+
+ // Err indicates why this context was canceled, after the Done channel
+ // is closed.
+ Err() error
+}
+
+// The key type is unexported to prevent collisions
+type key int
+
+// namespaceKey is the context key for the request namespace.
+const namespaceKey key = 0
+
+// userKey is the context key for the request user.
+const userKey key = 1
+
+// NewContext instantiates a base context object for request flows.
+func NewContext() Context {
+ return context.TODO()
+}
+
+// NewDefaultContext instantiates a base context object for request flows in the default namespace
+func NewDefaultContext() Context {
+ return WithNamespace(NewContext(), NamespaceDefault)
+}
+
+// WithValue returns a copy of parent in which the value associated with key is val.
+func WithValue(parent Context, key interface{}, val interface{}) Context {
+ internalCtx, ok := parent.(context.Context)
+ if !ok {
+ panic(stderrs.New("Invalid context type"))
+ }
+ return context.WithValue(internalCtx, key, val)
+}
+
+// WithNamespace returns a copy of parent in which the namespace value is set
+func WithNamespace(parent Context, namespace string) Context {
+ return WithValue(parent, namespaceKey, namespace)
+}
+
+// NamespaceFrom returns the value of the namespace key on the ctx
+func NamespaceFrom(ctx Context) (string, bool) {
+ namespace, ok := ctx.Value(namespaceKey).(string)
+ return namespace, ok
+}
+
+// NamespaceValue returns the value of the namespace key on the ctx, or the empty string if none
+func NamespaceValue(ctx Context) string {
+ namespace, _ := NamespaceFrom(ctx)
+ return namespace
+}
+
+// ValidNamespace returns false if the namespace on the context differs from the resource. If the resource has no namespace, it is set to the value in the context.
+func ValidNamespace(ctx Context, resource *ObjectMeta) bool {
+ ns, ok := NamespaceFrom(ctx)
+ if len(resource.Namespace) == 0 {
+ resource.Namespace = ns
+ }
+ return ns == resource.Namespace && ok
+}
+
+// WithNamespaceDefaultIfNone returns a context whose namespace is the default if and only if the parent context has no namespace value
+func WithNamespaceDefaultIfNone(parent Context) Context {
+ namespace, ok := NamespaceFrom(parent)
+ if !ok || len(namespace) == 0 {
+ return WithNamespace(parent, NamespaceDefault)
+ }
+ return parent
+}
+
+// WithUser returns a copy of parent in which the user value is set
+func WithUser(parent Context, user user.Info) Context {
+ return WithValue(parent, userKey, user)
+}
+
+// UserFrom returns the value of the user key on the ctx
+func UserFrom(ctx Context) (user.Info, bool) {
+ user, ok := ctx.Value(userKey).(user.Info)
+ return user, ok
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/conversion.go
new file mode 100644
index 0000000..07585d8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/conversion.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 api
+
+import (
+ "k8s.io/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/fields"
+ "k8s.io/kubernetes/pkg/labels"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+func init() {
+ Scheme.AddDefaultingFuncs(
+ func(obj *ListOptions) {
+ if obj.LabelSelector == nil {
+ obj.LabelSelector = labels.Everything()
+ }
+ if obj.FieldSelector == nil {
+ obj.FieldSelector = fields.Everything()
+ }
+ },
+ )
+ Scheme.AddConversionFuncs(
+ Convert_unversioned_TypeMeta_To_unversioned_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_string_To_labels_Selector,
+ Convert_string_To_fields_Selector,
+ Convert_Pointer_bool_To_bool,
+ Convert_bool_To_Pointer_bool,
+ Convert_Pointer_string_To_string,
+ Convert_string_To_Pointer_string,
+ Convert_labels_Selector_To_string,
+ Convert_fields_Selector_To_string,
+ Convert_resource_Quantity_To_resource_Quantity,
+ )
+}
+
+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
+}
+
+func Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(in, out *unversioned.TypeMeta, s conversion.Scope) error {
+ // These values are explicitly not copied
+ //out.APIVersion = in.APIVersion
+ //out.Kind = in.Kind
+ return nil
+}
+
+func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *unversioned.ListMeta, s conversion.Scope) error {
+ *out = *in
+ return nil
+}
+
+func Convert_intstr_IntOrString_To_intstr_IntOrString(in, out *intstr.IntOrString, s conversion.Scope) error {
+ *out = *in
+ return nil
+}
+
+func Convert_unversioned_Time_To_unversioned_Time(in *unversioned.Time, out *unversioned.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 *unversioned.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
+}
+func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *resource.Quantity, s conversion.Scope) error {
+ *out = *in
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go
new file mode 100644
index 0000000..340f365
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go
@@ -0,0 +1,2950 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ fields "k8s.io/kubernetes/pkg/fields"
+ labels "k8s.io/kubernetes/pkg/labels"
+ runtime "k8s.io/kubernetes/pkg/runtime"
+ types "k8s.io/kubernetes/pkg/types"
+)
+
+func init() {
+ if err := Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_api_AWSElasticBlockStoreVolumeSource,
+ DeepCopy_api_Affinity,
+ DeepCopy_api_AttachedVolume,
+ DeepCopy_api_AzureFileVolumeSource,
+ DeepCopy_api_Binding,
+ DeepCopy_api_Capabilities,
+ DeepCopy_api_CephFSVolumeSource,
+ DeepCopy_api_CinderVolumeSource,
+ DeepCopy_api_ComponentCondition,
+ DeepCopy_api_ComponentStatus,
+ DeepCopy_api_ComponentStatusList,
+ DeepCopy_api_ConfigMap,
+ DeepCopy_api_ConfigMapKeySelector,
+ DeepCopy_api_ConfigMapList,
+ DeepCopy_api_ConfigMapVolumeSource,
+ DeepCopy_api_Container,
+ DeepCopy_api_ContainerImage,
+ DeepCopy_api_ContainerPort,
+ DeepCopy_api_ContainerState,
+ DeepCopy_api_ContainerStateRunning,
+ DeepCopy_api_ContainerStateTerminated,
+ DeepCopy_api_ContainerStateWaiting,
+ DeepCopy_api_ContainerStatus,
+ DeepCopy_api_ConversionError,
+ DeepCopy_api_DaemonEndpoint,
+ DeepCopy_api_DeleteOptions,
+ DeepCopy_api_DownwardAPIVolumeFile,
+ DeepCopy_api_DownwardAPIVolumeSource,
+ DeepCopy_api_EmptyDirVolumeSource,
+ DeepCopy_api_EndpointAddress,
+ DeepCopy_api_EndpointPort,
+ DeepCopy_api_EndpointSubset,
+ DeepCopy_api_Endpoints,
+ DeepCopy_api_EndpointsList,
+ DeepCopy_api_EnvVar,
+ DeepCopy_api_EnvVarSource,
+ DeepCopy_api_Event,
+ DeepCopy_api_EventList,
+ DeepCopy_api_EventSource,
+ DeepCopy_api_ExecAction,
+ DeepCopy_api_ExportOptions,
+ DeepCopy_api_FCVolumeSource,
+ DeepCopy_api_FlexVolumeSource,
+ DeepCopy_api_FlockerVolumeSource,
+ DeepCopy_api_GCEPersistentDiskVolumeSource,
+ DeepCopy_api_GitRepoVolumeSource,
+ DeepCopy_api_GlusterfsVolumeSource,
+ DeepCopy_api_HTTPGetAction,
+ DeepCopy_api_HTTPHeader,
+ DeepCopy_api_Handler,
+ DeepCopy_api_HostPathVolumeSource,
+ DeepCopy_api_ISCSIVolumeSource,
+ DeepCopy_api_KeyToPath,
+ DeepCopy_api_Lifecycle,
+ DeepCopy_api_LimitRange,
+ DeepCopy_api_LimitRangeItem,
+ DeepCopy_api_LimitRangeList,
+ DeepCopy_api_LimitRangeSpec,
+ DeepCopy_api_List,
+ DeepCopy_api_ListOptions,
+ DeepCopy_api_LoadBalancerIngress,
+ DeepCopy_api_LoadBalancerStatus,
+ DeepCopy_api_LocalObjectReference,
+ DeepCopy_api_NFSVolumeSource,
+ DeepCopy_api_Namespace,
+ DeepCopy_api_NamespaceList,
+ DeepCopy_api_NamespaceSpec,
+ DeepCopy_api_NamespaceStatus,
+ DeepCopy_api_Node,
+ DeepCopy_api_NodeAddress,
+ DeepCopy_api_NodeAffinity,
+ DeepCopy_api_NodeCondition,
+ DeepCopy_api_NodeDaemonEndpoints,
+ DeepCopy_api_NodeList,
+ DeepCopy_api_NodeProxyOptions,
+ DeepCopy_api_NodeResources,
+ DeepCopy_api_NodeSelector,
+ DeepCopy_api_NodeSelectorRequirement,
+ DeepCopy_api_NodeSelectorTerm,
+ DeepCopy_api_NodeSpec,
+ DeepCopy_api_NodeStatus,
+ DeepCopy_api_NodeSystemInfo,
+ DeepCopy_api_ObjectFieldSelector,
+ DeepCopy_api_ObjectMeta,
+ DeepCopy_api_ObjectReference,
+ DeepCopy_api_OwnerReference,
+ DeepCopy_api_PersistentVolume,
+ DeepCopy_api_PersistentVolumeClaim,
+ DeepCopy_api_PersistentVolumeClaimList,
+ DeepCopy_api_PersistentVolumeClaimSpec,
+ DeepCopy_api_PersistentVolumeClaimStatus,
+ DeepCopy_api_PersistentVolumeClaimVolumeSource,
+ DeepCopy_api_PersistentVolumeList,
+ DeepCopy_api_PersistentVolumeSource,
+ DeepCopy_api_PersistentVolumeSpec,
+ DeepCopy_api_PersistentVolumeStatus,
+ DeepCopy_api_Pod,
+ DeepCopy_api_PodAffinity,
+ DeepCopy_api_PodAffinityTerm,
+ DeepCopy_api_PodAntiAffinity,
+ DeepCopy_api_PodAttachOptions,
+ DeepCopy_api_PodCondition,
+ DeepCopy_api_PodExecOptions,
+ DeepCopy_api_PodList,
+ DeepCopy_api_PodLogOptions,
+ DeepCopy_api_PodProxyOptions,
+ DeepCopy_api_PodSecurityContext,
+ DeepCopy_api_PodSpec,
+ DeepCopy_api_PodStatus,
+ DeepCopy_api_PodStatusResult,
+ DeepCopy_api_PodTemplate,
+ DeepCopy_api_PodTemplateList,
+ DeepCopy_api_PodTemplateSpec,
+ DeepCopy_api_Preconditions,
+ DeepCopy_api_PreferredSchedulingTerm,
+ DeepCopy_api_Probe,
+ DeepCopy_api_RBDVolumeSource,
+ DeepCopy_api_RangeAllocation,
+ DeepCopy_api_ReplicationController,
+ DeepCopy_api_ReplicationControllerList,
+ DeepCopy_api_ReplicationControllerSpec,
+ DeepCopy_api_ReplicationControllerStatus,
+ DeepCopy_api_ResourceFieldSelector,
+ DeepCopy_api_ResourceQuota,
+ DeepCopy_api_ResourceQuotaList,
+ DeepCopy_api_ResourceQuotaSpec,
+ DeepCopy_api_ResourceQuotaStatus,
+ DeepCopy_api_ResourceRequirements,
+ DeepCopy_api_SELinuxOptions,
+ DeepCopy_api_Secret,
+ DeepCopy_api_SecretKeySelector,
+ DeepCopy_api_SecretList,
+ DeepCopy_api_SecretVolumeSource,
+ DeepCopy_api_SecurityContext,
+ DeepCopy_api_SerializedReference,
+ DeepCopy_api_Service,
+ DeepCopy_api_ServiceAccount,
+ DeepCopy_api_ServiceAccountList,
+ DeepCopy_api_ServiceList,
+ DeepCopy_api_ServicePort,
+ DeepCopy_api_ServiceProxyOptions,
+ DeepCopy_api_ServiceSpec,
+ DeepCopy_api_ServiceStatus,
+ DeepCopy_api_TCPSocketAction,
+ DeepCopy_api_Taint,
+ DeepCopy_api_Toleration,
+ DeepCopy_api_Volume,
+ DeepCopy_api_VolumeMount,
+ DeepCopy_api_VolumeSource,
+ DeepCopy_api_VsphereVirtualDiskVolumeSource,
+ DeepCopy_api_WeightedPodAffinityTerm,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, c *conversion.Cloner) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_Affinity(in Affinity, out *Affinity, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.NodeAffinity = nil
+ }
+ 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
+ }
+ } else {
+ out.PodAffinity = nil
+ }
+ 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
+ }
+ } else {
+ out.PodAntiAffinity = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_AttachedVolume(in AttachedVolume, out *AttachedVolume, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.DevicePath = in.DevicePath
+ return nil
+}
+
+func DeepCopy_api_AzureFileVolumeSource(in AzureFileVolumeSource, out *AzureFileVolumeSource, c *conversion.Cloner) error {
+ out.SecretName = in.SecretName
+ out.ShareName = in.ShareName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_Binding(in Binding, out *Binding, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Target = in.Target
+ return nil
+}
+
+func DeepCopy_api_Capabilities(in Capabilities, out *Capabilities, c *conversion.Cloner) error {
+ if in.Add != nil {
+ in, out := in.Add, &out.Add
+ *out = make([]Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Add = nil
+ }
+ if in.Drop != nil {
+ in, out := in.Drop, &out.Drop
+ *out = make([]Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Drop = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_CephFSVolumeSource(in CephFSVolumeSource, out *CephFSVolumeSource, c *conversion.Cloner) error {
+ if in.Monitors != nil {
+ in, out := in.Monitors, &out.Monitors
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Monitors = nil
+ }
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ if in.SecretRef != nil {
+ in, out := in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = *in
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_CinderVolumeSource(in CinderVolumeSource, out *CinderVolumeSource, c *conversion.Cloner) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_ComponentCondition(in ComponentCondition, out *ComponentCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.Message = in.Message
+ out.Error = in.Error
+ return nil
+}
+
+func DeepCopy_api_ComponentStatus(in ComponentStatus, out *ComponentStatus, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Conditions != nil {
+ in, out := in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Conditions = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ComponentStatusList(in ComponentStatusList, out *ComponentStatusList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Data != nil {
+ in, out := in.Data, &out.Data
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Data = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error {
+ out.LocalObjectReference = in.LocalObjectReference
+ out.Key = in.Key
+ return nil
+}
+
+func DeepCopy_api_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ConfigMapVolumeSource(in ConfigMapVolumeSource, out *ConfigMapVolumeSource, c *conversion.Cloner) error {
+ out.LocalObjectReference = in.LocalObjectReference
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]KeyToPath, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Image = in.Image
+ if in.Command != nil {
+ in, out := in.Command, &out.Command
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Command = nil
+ }
+ if in.Args != nil {
+ in, out := in.Args, &out.Args
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Args = nil
+ }
+ out.WorkingDir = in.WorkingDir
+ if in.Ports != nil {
+ in, out := in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ports = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.Env = nil
+ }
+ 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))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.VolumeMounts = nil
+ }
+ 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
+ }
+ } else {
+ out.LivenessProbe = nil
+ }
+ 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
+ }
+ } else {
+ out.ReadinessProbe = nil
+ }
+ 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
+ }
+ } else {
+ out.Lifecycle = nil
+ }
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.ImagePullPolicy = in.ImagePullPolicy
+ 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
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+func DeepCopy_api_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error {
+ if in.Names != nil {
+ in, out := in.Names, &out.Names
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Names = nil
+ }
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+func DeepCopy_api_ContainerPort(in ContainerPort, out *ContainerPort, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = in.Protocol
+ out.HostIP = in.HostIP
+ return nil
+}
+
+func DeepCopy_api_ContainerState(in ContainerState, out *ContainerState, c *conversion.Cloner) error {
+ if in.Waiting != nil {
+ in, out := in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ **out = *in
+ } else {
+ out.Waiting = nil
+ }
+ 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
+ }
+ } else {
+ out.Running = nil
+ }
+ 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
+ }
+ } else {
+ out.Terminated = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ContainerStateRunning(in ContainerStateRunning, out *ContainerStateRunning, c *conversion.Cloner) error {
+ out.StartedAt = in.StartedAt.DeepCopy()
+ return nil
+}
+
+func DeepCopy_api_ContainerStateTerminated(in ContainerStateTerminated, out *ContainerStateTerminated, c *conversion.Cloner) error {
+ out.ExitCode = in.ExitCode
+ out.Signal = in.Signal
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.StartedAt = in.StartedAt.DeepCopy()
+ out.FinishedAt = in.FinishedAt.DeepCopy()
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+func DeepCopy_api_ContainerStateWaiting(in ContainerStateWaiting, out *ContainerStateWaiting, c *conversion.Cloner) error {
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_api_ContainerStatus(in ContainerStatus, out *ContainerStatus, c *conversion.Cloner) error {
+ out.Name = in.Name
+ 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
+ }
+ out.Ready = in.Ready
+ out.RestartCount = in.RestartCount
+ out.Image = in.Image
+ out.ImageID = in.ImageID
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+func DeepCopy_api_ConversionError(in ConversionError, out *ConversionError, c *conversion.Cloner) error {
+ if in.In == nil {
+ out.In = nil
+ } else if newVal, err := c.DeepCopy(in.In); err != nil {
+ return err
+ } else {
+ out.In = newVal.(interface{})
+ }
+ if in.Out == nil {
+ out.Out = nil
+ } else if newVal, err := c.DeepCopy(in.Out); err != nil {
+ return err
+ } else {
+ out.Out = newVal.(interface{})
+ }
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_api_DaemonEndpoint(in DaemonEndpoint, out *DaemonEndpoint, c *conversion.Cloner) error {
+ out.Port = in.Port
+ return nil
+}
+
+func DeepCopy_api_DeleteOptions(in DeleteOptions, out *DeleteOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if in.GracePeriodSeconds != nil {
+ in, out := in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.GracePeriodSeconds = nil
+ }
+ 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
+ }
+ } else {
+ out.Preconditions = nil
+ }
+ if in.OrphanDependents != nil {
+ in, out := in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.OrphanDependents = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_DownwardAPIVolumeFile(in DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, c *conversion.Cloner) error {
+ out.Path = in.Path
+ if in.FieldRef != nil {
+ in, out := in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = *in
+ } else {
+ out.FieldRef = nil
+ }
+ 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
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_DownwardAPIVolumeSource(in DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_EmptyDirVolumeSource(in EmptyDirVolumeSource, out *EmptyDirVolumeSource, c *conversion.Cloner) error {
+ out.Medium = in.Medium
+ return nil
+}
+
+func DeepCopy_api_EndpointAddress(in EndpointAddress, out *EndpointAddress, c *conversion.Cloner) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ if in.TargetRef != nil {
+ in, out := in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ **out = *in
+ } else {
+ out.TargetRef = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_EndpointPort(in EndpointPort, out *EndpointPort, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Port = in.Port
+ out.Protocol = in.Protocol
+ return nil
+}
+
+func DeepCopy_api_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Addresses = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.NotReadyAddresses = nil
+ }
+ if in.Ports != nil {
+ in, out := in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ports = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_Endpoints(in Endpoints, out *Endpoints, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Subsets = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_EndpointsList(in EndpointsList, out *EndpointsList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_EnvVar(in EnvVar, out *EnvVar, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ 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
+ }
+ } else {
+ out.ValueFrom = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion.Cloner) error {
+ if in.FieldRef != nil {
+ in, out := in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = *in
+ } else {
+ out.FieldRef = nil
+ }
+ 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
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ **out = *in
+ } else {
+ out.ConfigMapKeyRef = nil
+ }
+ if in.SecretKeyRef != nil {
+ in, out := in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ **out = *in
+ } else {
+ out.SecretKeyRef = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_Event(in Event, out *Event, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.InvolvedObject = in.InvolvedObject
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.Source = in.Source
+ out.FirstTimestamp = in.FirstTimestamp.DeepCopy()
+ out.LastTimestamp = in.LastTimestamp.DeepCopy()
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+func DeepCopy_api_EventList(in EventList, out *EventList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_EventSource(in EventSource, out *EventSource, c *conversion.Cloner) error {
+ out.Component = in.Component
+ out.Host = in.Host
+ return nil
+}
+
+func DeepCopy_api_ExecAction(in ExecAction, out *ExecAction, c *conversion.Cloner) error {
+ if in.Command != nil {
+ in, out := in.Command, &out.Command
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Command = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func DeepCopy_api_FCVolumeSource(in FCVolumeSource, out *FCVolumeSource, c *conversion.Cloner) error {
+ if in.TargetWWNs != nil {
+ in, out := in.TargetWWNs, &out.TargetWWNs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.TargetWWNs = nil
+ }
+ if in.Lun != nil {
+ in, out := in.Lun, &out.Lun
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Lun = nil
+ }
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_FlexVolumeSource(in FlexVolumeSource, out *FlexVolumeSource, c *conversion.Cloner) error {
+ out.Driver = in.Driver
+ out.FSType = in.FSType
+ if in.SecretRef != nil {
+ in, out := in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = *in
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ if in.Options != nil {
+ in, out := in.Options, &out.Options
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Options = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_FlockerVolumeSource(in FlockerVolumeSource, out *FlockerVolumeSource, c *conversion.Cloner) error {
+ out.DatasetName = in.DatasetName
+ return nil
+}
+
+func DeepCopy_api_GCEPersistentDiskVolumeSource(in GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, c *conversion.Cloner) error {
+ out.PDName = in.PDName
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_GitRepoVolumeSource(in GitRepoVolumeSource, out *GitRepoVolumeSource, c *conversion.Cloner) error {
+ out.Repository = in.Repository
+ out.Revision = in.Revision
+ out.Directory = in.Directory
+ return nil
+}
+
+func DeepCopy_api_GlusterfsVolumeSource(in GlusterfsVolumeSource, out *GlusterfsVolumeSource, c *conversion.Cloner) error {
+ out.EndpointsName = in.EndpointsName
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_HTTPGetAction(in HTTPGetAction, out *HTTPGetAction, c *conversion.Cloner) error {
+ out.Path = in.Path
+ out.Port = in.Port
+ out.Host = in.Host
+ out.Scheme = in.Scheme
+ if in.HTTPHeaders != nil {
+ in, out := in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.HTTPHeaders = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_HTTPHeader(in HTTPHeader, out *HTTPHeader, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+func DeepCopy_api_Handler(in Handler, out *Handler, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.Exec = nil
+ }
+ 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
+ }
+ } else {
+ out.HTTPGet = nil
+ }
+ if in.TCPSocket != nil {
+ in, out := in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ **out = *in
+ } else {
+ out.TCPSocket = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_HostPathVolumeSource(in HostPathVolumeSource, out *HostPathVolumeSource, c *conversion.Cloner) error {
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_api_ISCSIVolumeSource(in ISCSIVolumeSource, out *ISCSIVolumeSource, c *conversion.Cloner) 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
+ return nil
+}
+
+func DeepCopy_api_KeyToPath(in KeyToPath, out *KeyToPath, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_api_Lifecycle(in Lifecycle, out *Lifecycle, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.PostStart = nil
+ }
+ 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
+ }
+ } else {
+ out.PreStop = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_LimitRange(in LimitRange, out *LimitRange, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_LimitRangeSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_LimitRangeItem(in LimitRangeItem, out *LimitRangeItem, c *conversion.Cloner) error {
+ out.Type = in.Type
+ if in.Max != nil {
+ in, out := in.Max, &out.Max
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Max = nil
+ }
+ if in.Min != nil {
+ in, out := in.Min, &out.Min
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Min = nil
+ }
+ if in.Default != nil {
+ in, out := in.Default, &out.Default
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Default = nil
+ }
+ if in.DefaultRequest != nil {
+ in, out := in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.DefaultRequest = nil
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.MaxLimitRequestRatio = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_LimitRangeList(in LimitRangeList, out *LimitRangeList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_LimitRangeSpec(in LimitRangeSpec, out *LimitRangeSpec, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Limits = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_List(in List, out *List, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 newVal, err := c.DeepCopy(in[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = newVal.(runtime.Object)
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ListOptions(in ListOptions, out *ListOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if in.LabelSelector == nil {
+ out.LabelSelector = nil
+ } else if newVal, err := c.DeepCopy(in.LabelSelector); err != nil {
+ return err
+ } else {
+ out.LabelSelector = newVal.(labels.Selector)
+ }
+ if in.FieldSelector == nil {
+ out.FieldSelector = nil
+ } else if newVal, err := c.DeepCopy(in.FieldSelector); err != nil {
+ return err
+ } else {
+ out.FieldSelector = newVal.(fields.Selector)
+ }
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ if in.TimeoutSeconds != nil {
+ in, out := in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TimeoutSeconds = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_LoadBalancerIngress(in LoadBalancerIngress, out *LoadBalancerIngress, c *conversion.Cloner) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ return nil
+}
+
+func DeepCopy_api_LoadBalancerStatus(in LoadBalancerStatus, out *LoadBalancerStatus, c *conversion.Cloner) error {
+ if in.Ingress != nil {
+ in, out := in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_LocalObjectReference(in LocalObjectReference, out *LocalObjectReference, c *conversion.Cloner) error {
+ out.Name = in.Name
+ return nil
+}
+
+func DeepCopy_api_NFSVolumeSource(in NFSVolumeSource, out *NFSVolumeSource, c *conversion.Cloner) error {
+ out.Server = in.Server
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_Namespace(in Namespace, out *Namespace, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_NamespaceSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_api_NamespaceList(in NamespaceList, out *NamespaceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NamespaceSpec(in NamespaceSpec, out *NamespaceSpec, c *conversion.Cloner) error {
+ if in.Finalizers != nil {
+ in, out := in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Finalizers = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NamespaceStatus(in NamespaceStatus, out *NamespaceStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ return nil
+}
+
+func DeepCopy_api_Node(in Node, out *Node, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Spec = in.Spec
+ if err := DeepCopy_api_NodeStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeAddress(in NodeAddress, out *NodeAddress, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Address = in.Address
+ return nil
+}
+
+func DeepCopy_api_NodeAffinity(in NodeAffinity, out *NodeAffinity, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeCondition(in NodeCondition, out *NodeCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_api_NodeDaemonEndpoints(in NodeDaemonEndpoints, out *NodeDaemonEndpoints, c *conversion.Cloner) error {
+ out.KubeletEndpoint = in.KubeletEndpoint
+ return nil
+}
+
+func DeepCopy_api_NodeList(in NodeList, out *NodeList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeProxyOptions(in NodeProxyOptions, out *NodeProxyOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_api_NodeResources(in NodeResources, out *NodeResources, c *conversion.Cloner) error {
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeSelector(in NodeSelector, out *NodeSelector, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.NodeSelectorTerms = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeSelectorRequirement(in NodeSelectorRequirement, out *NodeSelectorRequirement, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ if in.Values != nil {
+ in, out := in.Values, &out.Values
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Values = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeSelectorTerm(in NodeSelectorTerm, out *NodeSelectorTerm, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) error {
+ out.PodCIDR = in.PodCIDR
+ out.ExternalID = in.ExternalID
+ out.ProviderID = in.ProviderID
+ out.Unschedulable = in.Unschedulable
+ return nil
+}
+
+func DeepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Cloner) error {
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ if in.Allocatable != nil {
+ in, out := in.Allocatable, &out.Allocatable
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Allocatable = nil
+ }
+ out.Phase = in.Phase
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.Addresses != nil {
+ in, out := in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Addresses = nil
+ }
+ out.DaemonEndpoints = in.DaemonEndpoints
+ out.NodeInfo = in.NodeInfo
+ 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
+ }
+ }
+ } else {
+ out.Images = nil
+ }
+ if in.VolumesInUse != nil {
+ in, out := in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.VolumesInUse = nil
+ }
+ if in.VolumesAttached != nil {
+ in, out := in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.VolumesAttached = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_NodeSystemInfo(in NodeSystemInfo, out *NodeSystemInfo, c *conversion.Cloner) 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
+}
+
+func DeepCopy_api_ObjectFieldSelector(in ObjectFieldSelector, out *ObjectFieldSelector, c *conversion.Cloner) error {
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+func DeepCopy_api_ObjectMeta(in ObjectMeta, out *ObjectMeta, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.GenerateName = in.GenerateName
+ out.Namespace = in.Namespace
+ out.SelfLink = in.SelfLink
+ out.UID = in.UID
+ out.ResourceVersion = in.ResourceVersion
+ out.Generation = in.Generation
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.DeletionTimestamp = nil
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.DeletionGracePeriodSeconds = nil
+ }
+ if in.Labels != nil {
+ in, out := in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Labels = nil
+ }
+ if in.Annotations != nil {
+ in, out := in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Annotations = nil
+ }
+ if in.OwnerReferences != nil {
+ in, out := in.OwnerReferences, &out.OwnerReferences
+ *out = make([]OwnerReference, len(in))
+ for i := range in {
+ if err := DeepCopy_api_OwnerReference(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.OwnerReferences = nil
+ }
+ if in.Finalizers != nil {
+ in, out := in.Finalizers, &out.Finalizers
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Finalizers = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ObjectReference(in ObjectReference, out *ObjectReference, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ out.UID = in.UID
+ out.APIVersion = in.APIVersion
+ out.ResourceVersion = in.ResourceVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+func DeepCopy_api_OwnerReference(in OwnerReference, out *OwnerReference, c *conversion.Cloner) error {
+ out.APIVersion = in.APIVersion
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.UID = in.UID
+ if in.Controller != nil {
+ in, out := in.Controller, &out.Controller
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.Controller = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PersistentVolume(in PersistentVolume, out *PersistentVolume, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PersistentVolumeSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeClaim(in PersistentVolumeClaim, out *PersistentVolumeClaim, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_api_PersistentVolumeClaimList(in PersistentVolumeClaimList, out *PersistentVolumeClaimList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeClaimSpec(in PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, c *conversion.Cloner) error {
+ if in.AccessModes != nil {
+ in, out := in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := DeepCopy_api_ResourceRequirements(in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeClaimStatus(in PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ if in.AccessModes != nil {
+ in, out := in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeClaimVolumeSource(in PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, c *conversion.Cloner) error {
+ out.ClaimName = in.ClaimName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeList(in PersistentVolumeList, out *PersistentVolumeList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_api_PersistentVolume(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *PersistentVolumeSource, c *conversion.Cloner) error {
+ if in.GCEPersistentDisk != nil {
+ in, out := in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = *in
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = *in
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.HostPath != nil {
+ in, out := in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = *in
+ } else {
+ out.HostPath = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = *in
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.NFS != nil {
+ in, out := in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = *in
+ } else {
+ out.NFS = nil
+ }
+ 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
+ }
+ } else {
+ out.RBD = nil
+ }
+ if in.ISCSI != nil {
+ in, out := in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ **out = *in
+ } else {
+ out.ISCSI = nil
+ }
+ 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
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.Cinder != nil {
+ in, out := in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = *in
+ } else {
+ out.Cinder = nil
+ }
+ 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
+ }
+ } else {
+ out.CephFS = nil
+ }
+ 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
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.Flocker != nil {
+ in, out := in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = *in
+ } else {
+ out.Flocker = nil
+ }
+ if in.AzureFile != nil {
+ in, out := in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = *in
+ } else {
+ out.AzureFile = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = *in
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentVolumeSpec, c *conversion.Cloner) error {
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ 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))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.ClaimRef != nil {
+ in, out := in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ **out = *in
+ } else {
+ out.ClaimRef = nil
+ }
+ out.PersistentVolumeReclaimPolicy = in.PersistentVolumeReclaimPolicy
+ return nil
+}
+
+func DeepCopy_api_PersistentVolumeStatus(in PersistentVolumeStatus, out *PersistentVolumeStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ out.Message = in.Message
+ out.Reason = in.Reason
+ return nil
+}
+
+func DeepCopy_api_Pod(in Pod, out *Pod, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_api_PodAffinity(in PodAffinity, out *PodAffinity, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodAffinityTerm(in PodAffinityTerm, out *PodAffinityTerm, c *conversion.Cloner) error {
+ if in.LabelSelector != nil {
+ in, out := in.LabelSelector, &out.LabelSelector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.LabelSelector = nil
+ }
+ if in.Namespaces != nil {
+ in, out := in.Namespaces, &out.Namespaces
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Namespaces = nil
+ }
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+func DeepCopy_api_PodAntiAffinity(in PodAntiAffinity, out *PodAntiAffinity, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodAttachOptions(in PodAttachOptions, out *PodAttachOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+func DeepCopy_api_PodCondition(in PodCondition, out *PodCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_api_PodExecOptions(in PodExecOptions, out *PodExecOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ if in.Command != nil {
+ in, out := in.Command, &out.Command
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Command = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodList(in PodList, out *PodList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_api_Pod(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodLogOptions(in PodLogOptions, out *PodLogOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ if in.SinceSeconds != nil {
+ in, out := in.SinceSeconds, &out.SinceSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.SinceSeconds = nil
+ }
+ if in.SinceTime != nil {
+ in, out := in.SinceTime, &out.SinceTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.SinceTime = nil
+ }
+ out.Timestamps = in.Timestamps
+ if in.TailLines != nil {
+ in, out := in.TailLines, &out.TailLines
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TailLines = nil
+ }
+ if in.LimitBytes != nil {
+ in, out := in.LimitBytes, &out.LimitBytes
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.LimitBytes = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodProxyOptions(in PodProxyOptions, out *PodProxyOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_api_PodSecurityContext(in PodSecurityContext, out *PodSecurityContext, c *conversion.Cloner) error {
+ out.HostNetwork = in.HostNetwork
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ if in.SELinuxOptions != nil {
+ in, out := in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = *in
+ } else {
+ out.SELinuxOptions = nil
+ }
+ if in.RunAsUser != nil {
+ in, out := in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.RunAsUser = nil
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.RunAsNonRoot = nil
+ }
+ if in.SupplementalGroups != nil {
+ in, out := in.SupplementalGroups, &out.SupplementalGroups
+ *out = make([]int64, len(in))
+ copy(*out, in)
+ } else {
+ out.SupplementalGroups = nil
+ }
+ if in.FSGroup != nil {
+ in, out := in.FSGroup, &out.FSGroup
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.FSGroup = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.InitContainers = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.Containers = nil
+ }
+ out.RestartPolicy = in.RestartPolicy
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TerminationGracePeriodSeconds = nil
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ActiveDeadlineSeconds = nil
+ }
+ out.DNSPolicy = in.DNSPolicy
+ if in.NodeSelector != nil {
+ in, out := in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.NodeSelector = nil
+ }
+ out.ServiceAccountName = in.ServiceAccountName
+ out.NodeName = in.NodeName
+ 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
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ return nil
+}
+
+func DeepCopy_api_PodStatus(in PodStatus, out *PodStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ if in.StartTime != nil {
+ in, out := in.StartTime, &out.StartTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.StartTime = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.InitContainerStatuses = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.ContainerStatuses = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodStatusResult(in PodStatusResult, out *PodStatusResult, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PodStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_PodTemplate(in PodTemplate, out *PodTemplate, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_PodTemplateList(in PodTemplateList, out *PodTemplateList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_api_PodTemplate(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PodTemplateSpec(in PodTemplateSpec, out *PodTemplateSpec, c *conversion.Cloner) error {
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PodSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_Preconditions(in Preconditions, out *Preconditions, c *conversion.Cloner) error {
+ if in.UID != nil {
+ in, out := in.UID, &out.UID
+ *out = new(types.UID)
+ **out = *in
+ } else {
+ out.UID = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_PreferredSchedulingTerm(in PreferredSchedulingTerm, out *PreferredSchedulingTerm, c *conversion.Cloner) error {
+ out.Weight = in.Weight
+ if err := DeepCopy_api_NodeSelectorTerm(in.Preference, &out.Preference, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_Probe(in Probe, out *Probe, c *conversion.Cloner) error {
+ if err := DeepCopy_api_Handler(in.Handler, &out.Handler, c); 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
+}
+
+func DeepCopy_api_RBDVolumeSource(in RBDVolumeSource, out *RBDVolumeSource, c *conversion.Cloner) error {
+ if in.CephMonitors != nil {
+ in, out := in.CephMonitors, &out.CephMonitors
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.CephMonitors = nil
+ }
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ if in.SecretRef != nil {
+ in, out := in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = *in
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_api_RangeAllocation(in RangeAllocation, out *RangeAllocation, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Range = in.Range
+ if in.Data != nil {
+ in, out := in.Data, &out.Data
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Data = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ReplicationController(in ReplicationController, out *ReplicationController, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ReplicationControllerSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_api_ReplicationControllerList(in ReplicationControllerList, out *ReplicationControllerList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_api_ReplicationController(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ReplicationControllerSpec(in ReplicationControllerSpec, out *ReplicationControllerSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ReplicationControllerStatus(in ReplicationControllerStatus, out *ReplicationControllerStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func DeepCopy_api_ResourceFieldSelector(in ResourceFieldSelector, out *ResourceFieldSelector, c *conversion.Cloner) error {
+ out.ContainerName = in.ContainerName
+ out.Resource = in.Resource
+ out.Divisor = in.Divisor.DeepCopy()
+ return nil
+}
+
+func DeepCopy_api_ResourceQuota(in ResourceQuota, out *ResourceQuota, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_api_ResourceQuotaList(in ResourceQuotaList, out *ResourceQuotaList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ResourceQuotaSpec(in ResourceQuotaSpec, out *ResourceQuotaSpec, c *conversion.Cloner) error {
+ if in.Hard != nil {
+ in, out := in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Hard = nil
+ }
+ if in.Scopes != nil {
+ in, out := in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Scopes = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ResourceQuotaStatus(in ResourceQuotaStatus, out *ResourceQuotaStatus, c *conversion.Cloner) error {
+ if in.Hard != nil {
+ in, out := in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Hard = nil
+ }
+ if in.Used != nil {
+ in, out := in.Used, &out.Used
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Used = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ResourceRequirements(in ResourceRequirements, out *ResourceRequirements, c *conversion.Cloner) error {
+ if in.Limits != nil {
+ in, out := in.Limits, &out.Limits
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Limits = nil
+ }
+ if in.Requests != nil {
+ in, out := in.Requests, &out.Requests
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Requests = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_SELinuxOptions(in SELinuxOptions, out *SELinuxOptions, c *conversion.Cloner) error {
+ out.User = in.User
+ out.Role = in.Role
+ out.Type = in.Type
+ out.Level = in.Level
+ return nil
+}
+
+func DeepCopy_api_Secret(in Secret, out *Secret, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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)
+ }
+ }
+ } else {
+ out.Data = nil
+ }
+ out.Type = in.Type
+ return nil
+}
+
+func DeepCopy_api_SecretKeySelector(in SecretKeySelector, out *SecretKeySelector, c *conversion.Cloner) error {
+ out.LocalObjectReference = in.LocalObjectReference
+ out.Key = in.Key
+ return nil
+}
+
+func DeepCopy_api_SecretList(in SecretList, out *SecretList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_api_Secret(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_SecretVolumeSource(in SecretVolumeSource, out *SecretVolumeSource, c *conversion.Cloner) error {
+ out.SecretName = in.SecretName
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]KeyToPath, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_SecurityContext(in SecurityContext, out *SecurityContext, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.Capabilities = nil
+ }
+ if in.Privileged != nil {
+ in, out := in.Privileged, &out.Privileged
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.Privileged = nil
+ }
+ if in.SELinuxOptions != nil {
+ in, out := in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = *in
+ } else {
+ out.SELinuxOptions = nil
+ }
+ if in.RunAsUser != nil {
+ in, out := in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.RunAsUser = nil
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.RunAsNonRoot = nil
+ }
+ if in.ReadOnlyRootFilesystem != nil {
+ in, out := in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.ReadOnlyRootFilesystem = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_SerializedReference(in SerializedReference, out *SerializedReference, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Reference = in.Reference
+ return nil
+}
+
+func DeepCopy_api_Service(in Service, out *Service, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_api_ServiceAccount(in ServiceAccount, out *ServiceAccount, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Secrets != nil {
+ in, out := in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Secrets = nil
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ServiceAccountList(in ServiceAccountList, out *ServiceAccountList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ServiceList(in ServiceList, out *ServiceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_api_Service(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ServicePort(in ServicePort, out *ServicePort, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Protocol = in.Protocol
+ out.Port = in.Port
+ out.TargetPort = in.TargetPort
+ out.NodePort = in.NodePort
+ return nil
+}
+
+func DeepCopy_api_ServiceProxyOptions(in ServiceProxyOptions, out *ServiceProxyOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_api_ServiceSpec(in ServiceSpec, out *ServiceSpec, c *conversion.Cloner) error {
+ out.Type = in.Type
+ if in.Ports != nil {
+ in, out := in.Ports, &out.Ports
+ *out = make([]ServicePort, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ports = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.ClusterIP = in.ClusterIP
+ if in.ExternalIPs != nil {
+ in, out := in.ExternalIPs, &out.ExternalIPs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.ExternalIPs = nil
+ }
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.SessionAffinity = in.SessionAffinity
+ if in.LoadBalancerSourceRanges != nil {
+ in, out := in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.LoadBalancerSourceRanges = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_ServiceStatus(in ServiceStatus, out *ServiceStatus, c *conversion.Cloner) error {
+ if err := DeepCopy_api_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_TCPSocketAction(in TCPSocketAction, out *TCPSocketAction, c *conversion.Cloner) error {
+ out.Port = in.Port
+ return nil
+}
+
+func DeepCopy_api_Taint(in Taint, out *Taint, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = in.Effect
+ return nil
+}
+
+func DeepCopy_api_Toleration(in Toleration, out *Toleration, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ out.Value = in.Value
+ out.Effect = in.Effect
+ return nil
+}
+
+func DeepCopy_api_Volume(in Volume, out *Volume, c *conversion.Cloner) error {
+ out.Name = in.Name
+ if err := DeepCopy_api_VolumeSource(in.VolumeSource, &out.VolumeSource, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_api_VolumeMount(in VolumeMount, out *VolumeMount, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.ReadOnly = in.ReadOnly
+ out.MountPath = in.MountPath
+ out.SubPath = in.SubPath
+ return nil
+}
+
+func DeepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion.Cloner) error {
+ if in.HostPath != nil {
+ in, out := in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = *in
+ } else {
+ out.HostPath = nil
+ }
+ if in.EmptyDir != nil {
+ in, out := in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ **out = *in
+ } else {
+ out.EmptyDir = nil
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = *in
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = *in
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.GitRepo != nil {
+ in, out := in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ **out = *in
+ } else {
+ out.GitRepo = nil
+ }
+ 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
+ }
+ } else {
+ out.Secret = nil
+ }
+ if in.NFS != nil {
+ in, out := in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = *in
+ } else {
+ out.NFS = nil
+ }
+ if in.ISCSI != nil {
+ in, out := in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ **out = *in
+ } else {
+ out.ISCSI = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = *in
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ **out = *in
+ } else {
+ out.PersistentVolumeClaim = nil
+ }
+ 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
+ }
+ } else {
+ out.RBD = nil
+ }
+ 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
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.Cinder != nil {
+ in, out := in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = *in
+ } else {
+ out.Cinder = nil
+ }
+ 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
+ }
+ } else {
+ out.CephFS = nil
+ }
+ if in.Flocker != nil {
+ in, out := in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = *in
+ } else {
+ out.Flocker = nil
+ }
+ 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
+ }
+ } else {
+ out.DownwardAPI = nil
+ }
+ 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
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.AzureFile != nil {
+ in, out := in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = *in
+ } else {
+ out.AzureFile = nil
+ }
+ 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
+ }
+ } else {
+ out.ConfigMap = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = *in
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+func DeepCopy_api_VsphereVirtualDiskVolumeSource(in VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, c *conversion.Cloner) error {
+ out.VolumePath = in.VolumePath
+ out.FSType = in.FSType
+ return nil
+}
+
+func DeepCopy_api_WeightedPodAffinityTerm(in WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, c *conversion.Cloner) error {
+ out.Weight = in.Weight
+ if err := DeepCopy_api_PodAffinityTerm(in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/doc.go
new file mode 100644
index 0000000..1507a88
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go
new file mode 100644
index 0000000..792a253
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go
@@ -0,0 +1,238 @@
+/*
+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 endpoints
+
+import (
+ "bytes"
+ "crypto/md5"
+ "encoding/hex"
+ "hash"
+ "sort"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/types"
+ hashutil "k8s.io/kubernetes/pkg/util/hash"
+)
+
+const (
+ // TODO: to be deleted after v1.3 is released
+ // Its value is the json representation of map[string(IP)][HostRecord]
+ // example: '{"10.245.1.6":{"HostName":"my-webserver"}}'
+ PodHostnamesAnnotation = "endpoints.beta.kubernetes.io/hostnames-map"
+)
+
+// TODO: to be deleted after v1.3 is released
+type HostRecord struct {
+ HostName string
+}
+
+// RepackSubsets takes a slice of EndpointSubset objects, expands it to the full
+// representation, and then repacks that into the canonical layout. This
+// ensures that code which operates on these objects can rely on the common
+// form for things like comparison. The result is a newly allocated slice.
+func RepackSubsets(subsets []api.EndpointSubset) []api.EndpointSubset {
+ // First map each unique port definition to the sets of hosts that
+ // offer it.
+ allAddrs := map[addressKey]*api.EndpointAddress{}
+ portToAddrReadyMap := map[api.EndpointPort]addressSet{}
+ for i := range subsets {
+ for _, port := range subsets[i].Ports {
+ for k := range subsets[i].Addresses {
+ mapAddressByPort(&subsets[i].Addresses[k], port, true, allAddrs, portToAddrReadyMap)
+ }
+ for k := range subsets[i].NotReadyAddresses {
+ mapAddressByPort(&subsets[i].NotReadyAddresses[k], port, false, allAddrs, portToAddrReadyMap)
+ }
+ }
+ }
+
+ // Next, map the sets of hosts to the sets of ports they offer.
+ // Go does not allow maps or slices as keys to maps, so we have
+ // to synthesize an artificial key and do a sort of 2-part
+ // associative entity.
+ type keyString string
+ keyToAddrReadyMap := map[keyString]addressSet{}
+ addrReadyMapKeyToPorts := map[keyString][]api.EndpointPort{}
+ for port, addrs := range portToAddrReadyMap {
+ key := keyString(hashAddresses(addrs))
+ keyToAddrReadyMap[key] = addrs
+ addrReadyMapKeyToPorts[key] = append(addrReadyMapKeyToPorts[key], port)
+ }
+
+ // Next, build the N-to-M association the API wants.
+ final := []api.EndpointSubset{}
+ for key, ports := range addrReadyMapKeyToPorts {
+ var readyAddrs, notReadyAddrs []api.EndpointAddress
+ for addr, ready := range keyToAddrReadyMap[key] {
+ if ready {
+ readyAddrs = append(readyAddrs, *addr)
+ } else {
+ notReadyAddrs = append(notReadyAddrs, *addr)
+ }
+ }
+ final = append(final, api.EndpointSubset{Addresses: readyAddrs, NotReadyAddresses: notReadyAddrs, Ports: ports})
+ }
+
+ // Finally, sort it.
+ return SortSubsets(final)
+}
+
+// The sets of hosts must be de-duped, using IP+UID as the key.
+type addressKey struct {
+ ip string
+ uid types.UID
+}
+
+// mapAddressByPort adds an address into a map by its ports, registering the address with a unique pointer, and preserving
+// any existing ready state.
+func mapAddressByPort(addr *api.EndpointAddress, port api.EndpointPort, ready bool, allAddrs map[addressKey]*api.EndpointAddress, portToAddrReadyMap map[api.EndpointPort]addressSet) *api.EndpointAddress {
+ // use addressKey to distinguish between two endpoints that are identical addresses
+ // but may have come from different hosts, for attribution. For instance, Mesos
+ // assigns pods the node IP, but the pods are distinct.
+ key := addressKey{ip: addr.IP}
+ if addr.TargetRef != nil {
+ key.uid = addr.TargetRef.UID
+ }
+
+ // Accumulate the address. The full EndpointAddress structure is preserved for use when
+ // we rebuild the subsets so that the final TargetRef has all of the necessary data.
+ existingAddress := allAddrs[key]
+ if existingAddress == nil {
+ // Make a copy so we don't write to the
+ // input args of this function.
+ existingAddress = &api.EndpointAddress{}
+ *existingAddress = *addr
+ allAddrs[key] = existingAddress
+ }
+
+ // Remember that this port maps to this address.
+ if _, found := portToAddrReadyMap[port]; !found {
+ portToAddrReadyMap[port] = addressSet{}
+ }
+ // if we have not yet recorded this port for this address, or if the previous
+ // state was ready, write the current ready state. not ready always trumps
+ // ready.
+ if wasReady, found := portToAddrReadyMap[port][existingAddress]; !found || wasReady {
+ portToAddrReadyMap[port][existingAddress] = ready
+ }
+ return existingAddress
+}
+
+type addressSet map[*api.EndpointAddress]bool
+
+type addrReady struct {
+ addr *api.EndpointAddress
+ ready bool
+}
+
+func hashAddresses(addrs addressSet) string {
+ // Flatten the list of addresses into a string so it can be used as a
+ // map key. Unfortunately, DeepHashObject is implemented in terms of
+ // spew, and spew does not handle non-primitive map keys well. So
+ // first we collapse it into a slice, sort the slice, then hash that.
+ slice := make([]addrReady, 0, len(addrs))
+ for k, ready := range addrs {
+ slice = append(slice, addrReady{k, ready})
+ }
+ sort.Sort(addrsReady(slice))
+ hasher := md5.New()
+ hashutil.DeepHashObject(hasher, slice)
+ return hex.EncodeToString(hasher.Sum(nil)[0:])
+}
+
+func lessAddrReady(a, b addrReady) bool {
+ // ready is not significant to hashing since we can't have duplicate addresses
+ return LessEndpointAddress(a.addr, b.addr)
+}
+
+type addrsReady []addrReady
+
+func (sl addrsReady) Len() int { return len(sl) }
+func (sl addrsReady) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
+func (sl addrsReady) Less(i, j int) bool {
+ return lessAddrReady(sl[i], sl[j])
+}
+
+func LessEndpointAddress(a, b *api.EndpointAddress) bool {
+ ipComparison := bytes.Compare([]byte(a.IP), []byte(b.IP))
+ if ipComparison != 0 {
+ return ipComparison < 0
+ }
+ if b.TargetRef == nil {
+ return false
+ }
+ if a.TargetRef == nil {
+ return true
+ }
+ return a.TargetRef.UID < b.TargetRef.UID
+}
+
+type addrPtrsByIpAndUID []*api.EndpointAddress
+
+func (sl addrPtrsByIpAndUID) Len() int { return len(sl) }
+func (sl addrPtrsByIpAndUID) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
+func (sl addrPtrsByIpAndUID) Less(i, j int) bool {
+ return LessEndpointAddress(sl[i], sl[j])
+}
+
+// SortSubsets sorts an array of EndpointSubset objects in place. For ease of
+// use it returns the input slice.
+func SortSubsets(subsets []api.EndpointSubset) []api.EndpointSubset {
+ for i := range subsets {
+ ss := &subsets[i]
+ sort.Sort(addrsByIpAndUID(ss.Addresses))
+ sort.Sort(addrsByIpAndUID(ss.NotReadyAddresses))
+ sort.Sort(portsByHash(ss.Ports))
+ }
+ sort.Sort(subsetsByHash(subsets))
+ return subsets
+}
+
+func hashObject(hasher hash.Hash, obj interface{}) []byte {
+ hashutil.DeepHashObject(hasher, obj)
+ return hasher.Sum(nil)
+}
+
+type subsetsByHash []api.EndpointSubset
+
+func (sl subsetsByHash) Len() int { return len(sl) }
+func (sl subsetsByHash) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
+func (sl subsetsByHash) Less(i, j int) bool {
+ hasher := md5.New()
+ h1 := hashObject(hasher, sl[i])
+ h2 := hashObject(hasher, sl[j])
+ return bytes.Compare(h1, h2) < 0
+}
+
+type addrsByIpAndUID []api.EndpointAddress
+
+func (sl addrsByIpAndUID) Len() int { return len(sl) }
+func (sl addrsByIpAndUID) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
+func (sl addrsByIpAndUID) Less(i, j int) bool {
+ return LessEndpointAddress(&sl[i], &sl[j])
+}
+
+type portsByHash []api.EndpointPort
+
+func (sl portsByHash) Len() int { return len(sl) }
+func (sl portsByHash) Swap(i, j int) { sl[i], sl[j] = sl[j], sl[i] }
+func (sl portsByHash) Less(i, j int) bool {
+ hasher := md5.New()
+ h1 := hashObject(hasher, sl[i])
+ h2 := hashObject(hasher, sl[j])
+ return bytes.Compare(h1, h2) < 0
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go
new file mode 100644
index 0000000..58751ed
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go
new file mode 100644
index 0000000..a51fe94
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/errors/errors.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 errors
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/validation/field"
+)
+
+// HTTP Status codes not in the golang http package.
+const (
+ StatusUnprocessableEntity = 422
+ StatusTooManyRequests = 429
+ // HTTP recommendations are for servers to define 5xx error codes
+ // for scenarios not covered by behavior. In this case, ServerTimeout
+ // 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 unversioned.Status
+}
+
+// APIStatus is exposed by errors that can be converted to an api.Status object
+// for finer grained details.
+type APIStatus interface {
+ Status() unversioned.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. Used by pkg/apiserver.
+func (e *StatusError) Status() unversioned.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 unversioned.Status, if that is the type of obj; otherwise,
+// returns an UnexpecteObjectError.
+func FromObject(obj runtime.Object) error {
+ switch t := obj.(type) {
+ case *unversioned.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 unversioned.GroupResource, name string) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusNotFound,
+ Reason: unversioned.StatusReasonNotFound,
+ Details: &unversioned.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 unversioned.GroupResource, name string) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusConflict,
+ Reason: unversioned.StatusReasonAlreadyExists,
+ Details: &unversioned.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{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusUnauthorized,
+ Reason: unversioned.StatusReasonUnauthorized,
+ Message: message,
+ }}
+}
+
+// NewForbidden returns an error indicating the requested action was forbidden
+func NewForbidden(qualifiedResource unversioned.GroupResource, name string, err error) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusForbidden,
+ Reason: unversioned.StatusReasonForbidden,
+ Details: &unversioned.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 unversioned.GroupResource, name string, err error) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusConflict,
+ Reason: unversioned.StatusReasonConflict,
+ Details: &unversioned.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{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusGone,
+ Reason: unversioned.StatusReasonGone,
+ Message: message,
+ }}
+}
+
+// NewInvalid returns an error indicating the item is invalid and cannot be processed.
+func NewInvalid(qualifiedKind unversioned.GroupKind, name string, errs field.ErrorList) *StatusError {
+ causes := make([]unversioned.StatusCause, 0, len(errs))
+ for i := range errs {
+ err := errs[i]
+ causes = append(causes, unversioned.StatusCause{
+ Type: unversioned.CauseType(err.Type),
+ Message: err.ErrorBody(),
+ Field: err.Field,
+ })
+ }
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: StatusUnprocessableEntity, // RFC 4918: StatusUnprocessableEntity
+ Reason: unversioned.StatusReasonInvalid,
+ Details: &unversioned.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{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusBadRequest,
+ Reason: unversioned.StatusReasonBadRequest,
+ Message: reason,
+ }}
+}
+
+// NewServiceUnavailable creates an error that indicates that the requested service is unavailable.
+func NewServiceUnavailable(reason string) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusServiceUnavailable,
+ Reason: unversioned.StatusReasonServiceUnavailable,
+ Message: reason,
+ }}
+}
+
+// NewMethodNotSupported returns an error indicating the requested action is not supported on this kind.
+func NewMethodNotSupported(qualifiedResource unversioned.GroupResource, action string) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusMethodNotAllowed,
+ Reason: unversioned.StatusReasonMethodNotAllowed,
+ Details: &unversioned.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 unversioned.GroupResource, operation string, retryAfterSeconds int) *StatusError {
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusInternalServerError,
+ Reason: unversioned.StatusReasonServerTimeout,
+ Details: &unversioned.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 unversioned.GroupKind, operation string, retryAfterSeconds int) *StatusError {
+ return NewServerTimeout(unversioned.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{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: http.StatusInternalServerError,
+ Reason: unversioned.StatusReasonInternalError,
+ Details: &unversioned.StatusDetails{
+ Causes: []unversioned.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{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: StatusServerTimeout,
+ Reason: unversioned.StatusReasonTimeout,
+ Message: fmt.Sprintf("Timeout: %s", message),
+ Details: &unversioned.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 unversioned.GroupResource, name, serverMessage string, retryAfterSeconds int, isUnexpectedResponse bool) *StatusError {
+ reason := unversioned.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 = unversioned.StatusReasonAlreadyExists
+ } else {
+ reason = unversioned.StatusReasonConflict
+ }
+ message = "the server reported a conflict"
+ case http.StatusNotFound:
+ reason = unversioned.StatusReasonNotFound
+ message = "the server could not find the requested resource"
+ case http.StatusBadRequest:
+ reason = unversioned.StatusReasonBadRequest
+ message = "the server rejected our request for an unknown reason"
+ case http.StatusUnauthorized:
+ reason = unversioned.StatusReasonUnauthorized
+ message = "the server has asked for the client to provide credentials"
+ case http.StatusForbidden:
+ reason = unversioned.StatusReasonForbidden
+ message = "the server does not allow access to the requested resource"
+ case http.StatusMethodNotAllowed:
+ reason = unversioned.StatusReasonMethodNotAllowed
+ message = "the server does not allow this method on the requested resource"
+ case StatusUnprocessableEntity:
+ reason = unversioned.StatusReasonInvalid
+ message = "the server rejected our request due to an error in our request"
+ case StatusServerTimeout:
+ reason = unversioned.StatusReasonServerTimeout
+ message = "the server cannot complete the requested operation at this time, try again later"
+ case StatusTooManyRequests:
+ reason = unversioned.StatusReasonTimeout
+ message = "the server has received too many requests and has asked us to try again later"
+ default:
+ if code >= 500 {
+ reason = unversioned.StatusReasonInternalError
+ message = "an error on the server has prevented the request from succeeding"
+ }
+ }
+ switch {
+ case !qualifiedResource.IsEmpty() && len(name) > 0:
+ message = fmt.Sprintf("%s (%s %s %s)", message, strings.ToLower(verb), qualifiedResource.String(), name)
+ case !qualifiedResource.IsEmpty():
+ message = fmt.Sprintf("%s (%s %s)", message, strings.ToLower(verb), qualifiedResource.String())
+ }
+ var causes []unversioned.StatusCause
+ if isUnexpectedResponse {
+ causes = []unversioned.StatusCause{
+ {
+ Type: unversioned.CauseTypeUnexpectedServerResponse,
+ Message: serverMessage,
+ },
+ }
+ } else {
+ causes = nil
+ }
+ return &StatusError{unversioned.Status{
+ Status: unversioned.StatusFailure,
+ Code: int32(code),
+ Reason: reason,
+ Details: &unversioned.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) == unversioned.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) == unversioned.StatusReasonAlreadyExists
+}
+
+// IsConflict determines if the err is an error which indicates the provided update conflicts.
+func IsConflict(err error) bool {
+ return reasonForError(err) == unversioned.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) == unversioned.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) == unversioned.StatusReasonMethodNotAllowed
+}
+
+// IsBadRequest determines if err is an error which indicates that the request is invalid.
+func IsBadRequest(err error) bool {
+ return reasonForError(err) == unversioned.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) == unversioned.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) == unversioned.StatusReasonForbidden
+}
+
+// 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) == unversioned.StatusReasonServerTimeout
+}
+
+// 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 == unversioned.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 unversioned.StatusReasonServerTimeout, unversioned.StatusReasonTimeout:
+ return int(t.Status().Details.RetryAfterSeconds), true
+ }
+ }
+ }
+ return 0, false
+}
+
+func reasonForError(err error) unversioned.StatusReason {
+ switch t := err.(type) {
+ case APIStatus:
+ return t.Status().Reason
+ }
+ return unversioned.StatusReasonUnknown
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/field_constants.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/field_constants.go
new file mode 100644
index 0000000..5ead0f1
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/generate.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/generate.go
new file mode 100644
index 0000000..19379d3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/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 api
+
+import (
+ "fmt"
+
+ utilrand "k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/helpers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/helpers.go
new file mode 100644
index 0000000..ca873b3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/helpers.go
@@ -0,0 +1,502 @@
+/*
+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 (
+ "crypto/md5"
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "strings"
+ "time"
+
+ "k8s.io/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/fields"
+ "k8s.io/kubernetes/pkg/labels"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+ "k8s.io/kubernetes/pkg/util/sets"
+
+ "github.com/davecgh/go-spew/spew"
+)
+
+// Conversion error conveniently packages up errors in conversions.
+type ConversionError struct {
+ In, Out interface{}
+ Message string
+}
+
+// Return a helpful string about the error
+func (c *ConversionError) Error() string {
+ return spew.Sprintf(
+ "Conversion error: %s. (in: %v(%+v) out: %v)",
+ c.Message, reflect.TypeOf(c.In), c.In, reflect.TypeOf(c.Out),
+ )
+}
+
+// Semantic can do semantic deep equality checks for api objects.
+// Example: api.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 unversioned.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(ResourceQuotaScopeTerminating),
+ string(ResourceQuotaScopeNotTerminating),
+ string(ResourceQuotaScopeBestEffort),
+ string(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(ResourcePods),
+)
+
+var podComputeQuotaResources = sets.NewString(
+ string(ResourceCPU),
+ string(ResourceMemory),
+ string(ResourceLimitsCPU),
+ string(ResourceLimitsMemory),
+ string(ResourceRequestsCPU),
+ string(ResourceRequestsMemory),
+)
+
+// IsResourceQuotaScopeValidForResource returns true if the resource applies to the specified scope
+func IsResourceQuotaScopeValidForResource(scope ResourceQuotaScope, resource string) bool {
+ switch scope {
+ case ResourceQuotaScopeTerminating, ResourceQuotaScopeNotTerminating, ResourceQuotaScopeNotBestEffort:
+ return podObjectCountQuotaResources.Has(resource) || podComputeQuotaResources.Has(resource)
+ case ResourceQuotaScopeBestEffort:
+ return podObjectCountQuotaResources.Has(resource)
+ default:
+ return true
+ }
+}
+
+var standardContainerResources = sets.NewString(
+ string(ResourceCPU),
+ string(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)
+}
+
+var standardLimitRangeTypes = sets.NewString(
+ string(LimitTypePod),
+ string(LimitTypeContainer),
+)
+
+// IsStandardLimitRangeType returns true if the type is Pod or Container
+func IsStandardLimitRangeType(str string) bool {
+ return standardLimitRangeTypes.Has(str)
+}
+
+var standardQuotaResources = sets.NewString(
+ string(ResourceCPU),
+ string(ResourceMemory),
+ string(ResourceRequestsCPU),
+ string(ResourceRequestsMemory),
+ string(ResourceLimitsCPU),
+ string(ResourceLimitsMemory),
+ string(ResourcePods),
+ string(ResourceQuotas),
+ string(ResourceServices),
+ string(ResourceReplicationControllers),
+ string(ResourceSecrets),
+ string(ResourcePersistentVolumeClaims),
+ string(ResourceConfigMaps),
+ string(ResourceServicesNodePorts),
+ string(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(ResourceCPU),
+ string(ResourceMemory),
+ string(ResourceRequestsCPU),
+ string(ResourceRequestsMemory),
+ string(ResourceLimitsCPU),
+ string(ResourceLimitsMemory),
+ string(ResourcePods),
+ string(ResourceQuotas),
+ string(ResourceServices),
+ string(ResourceReplicationControllers),
+ string(ResourceSecrets),
+ string(ResourceConfigMaps),
+ string(ResourcePersistentVolumeClaims),
+ string(ResourceStorage),
+)
+
+// 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(ResourcePods),
+ string(ResourceQuotas),
+ string(ResourceServices),
+ string(ResourceReplicationControllers),
+ string(ResourceSecrets),
+ string(ResourceConfigMaps),
+ string(ResourcePersistentVolumeClaims),
+ string(ResourceServicesNodePorts),
+ string(ResourceServicesLoadBalancers),
+)
+
+// IsIntegerResourceName returns true if the resource is measured in integer values
+func IsIntegerResourceName(str string) bool {
+ return integerResources.Has(str)
+}
+
+// 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 &api.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}
+}
+
+// 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 *Service) bool {
+ return service.Spec.ClusterIP != ClusterIPNone && service.Spec.ClusterIP != ""
+}
+
+// this function aims to check if the service's cluster IP is requested or not
+func IsServiceIPRequested(service *Service) bool {
+ return service.Spec.ClusterIP == ""
+}
+
+var standardFinalizers = sets.NewString(
+ string(FinalizerKubernetes),
+ FinalizerOrphan,
+)
+
+func IsStandardFinalizerName(str string) bool {
+ return standardFinalizers.Has(str)
+}
+
+// SingleObject returns a ListOptions for watching a single object.
+func SingleObject(meta ObjectMeta) ListOptions {
+ return ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name),
+ ResourceVersion: meta.ResourceVersion,
+ }
+}
+
+// AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice,
+// only if they do not already exist
+func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...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)
+ }
+ }
+}
+
+func HashObject(obj runtime.Object, codec runtime.Codec) (string, error) {
+ data, err := runtime.Encode(codec, obj)
+ if err != nil {
+ return "", err
+ }
+ return fmt.Sprintf("%x", md5.Sum(data)), nil
+}
+
+// TODO: make method on LoadBalancerStatus?
+func LoadBalancerStatusEqual(l, r *LoadBalancerStatus) bool {
+ return ingressSliceEqual(l.Ingress, r.Ingress)
+}
+
+func ingressSliceEqual(lhs, rhs []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 *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 *LoadBalancerStatus) *LoadBalancerStatus {
+ c := &LoadBalancerStatus{}
+ c.Ingress = make([]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 []PersistentVolumeAccessMode) string {
+ modes = removeDuplicateAccessModes(modes)
+ modesStr := []string{}
+ if containsAccessMode(modes, ReadWriteOnce) {
+ modesStr = append(modesStr, "RWO")
+ }
+ if containsAccessMode(modes, ReadOnlyMany) {
+ modesStr = append(modesStr, "ROX")
+ }
+ if containsAccessMode(modes, 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) []PersistentVolumeAccessMode {
+ strmodes := strings.Split(modes, ",")
+ accessModes := []PersistentVolumeAccessMode{}
+ for _, s := range strmodes {
+ s = strings.Trim(s, " ")
+ switch {
+ case s == "RWO":
+ accessModes = append(accessModes, ReadWriteOnce)
+ case s == "ROX":
+ accessModes = append(accessModes, ReadOnlyMany)
+ case s == "RWX":
+ accessModes = append(accessModes, ReadWriteMany)
+ }
+ }
+ return accessModes
+}
+
+// removeDuplicateAccessModes returns an array of access modes without any duplicates
+func removeDuplicateAccessModes(modes []PersistentVolumeAccessMode) []PersistentVolumeAccessMode {
+ accessModes := []PersistentVolumeAccessMode{}
+ for _, m := range modes {
+ if !containsAccessMode(accessModes, m) {
+ accessModes = append(accessModes, m)
+ }
+ }
+ return accessModes
+}
+
+func containsAccessMode(modes []PersistentVolumeAccessMode, mode PersistentVolumeAccessMode) bool {
+ for _, m := range modes {
+ if m == mode {
+ return true
+ }
+ }
+ return false
+}
+
+// ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format.
+func ParseRFC3339(s string, nowFn func() unversioned.Time) (unversioned.Time, error) {
+ if t, timeErr := time.Parse(time.RFC3339Nano, s); timeErr == nil {
+ return unversioned.Time{Time: t}, nil
+ }
+ t, err := time.Parse(time.RFC3339, s)
+ if err != nil {
+ return unversioned.Time{}, err
+ }
+ return unversioned.Time{Time: t}, nil
+}
+
+// NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements
+// labels.Selector.
+func NodeSelectorRequirementsAsSelector(nsm []NodeSelectorRequirement) (labels.Selector, error) {
+ if len(nsm) == 0 {
+ return labels.Nothing(), nil
+ }
+ selector := labels.NewSelector()
+ for _, expr := range nsm {
+ var op labels.Operator
+ switch expr.Operator {
+ case NodeSelectorOpIn:
+ op = labels.InOperator
+ case NodeSelectorOpNotIn:
+ op = labels.NotInOperator
+ case NodeSelectorOpExists:
+ op = labels.ExistsOperator
+ case NodeSelectorOpDoesNotExist:
+ op = labels.DoesNotExistOperator
+ case NodeSelectorOpGt:
+ op = labels.GreaterThanOperator
+ case NodeSelectorOpLt:
+ op = labels.LessThanOperator
+ default:
+ return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator)
+ }
+ r, err := labels.NewRequirement(expr.Key, op, sets.NewString(expr.Values...))
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ return selector, nil
+}
+
+const (
+ // AffinityAnnotationKey represents the key of affinity data (json serialized)
+ // in the Annotations of a Pod.
+ AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
+
+ // 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"
+)
+
+// GetAffinityFromPod gets the json serialized affinity data from Pod.Annotations
+// and converts it to the Affinity type in api.
+func GetAffinityFromPodAnnotations(annotations map[string]string) (Affinity, error) {
+ var affinity Affinity
+ if len(annotations) > 0 && annotations[AffinityAnnotationKey] != "" {
+ err := json.Unmarshal([]byte(annotations[AffinityAnnotationKey]), &affinity)
+ if err != nil {
+ return affinity, err
+ }
+ }
+ return affinity, 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) ([]Toleration, error) {
+ var tolerations []Toleration
+ if len(annotations) > 0 && annotations[TolerationsAnnotationKey] != "" {
+ err := json.Unmarshal([]byte(annotations[TolerationsAnnotationKey]), &tolerations)
+ if err != nil {
+ return tolerations, err
+ }
+ }
+ return tolerations, nil
+}
+
+// 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) ([]Taint, error) {
+ var taints []Taint
+ if len(annotations) > 0 && annotations[TaintsAnnotationKey] != "" {
+ err := json.Unmarshal([]byte(annotations[TaintsAnnotationKey]), &taints)
+ if err != nil {
+ return []Taint{}, err
+ }
+ }
+ return taints, nil
+}
+
+// TolerationToleratesTaint checks if the toleration tolerates the taint.
+func TolerationToleratesTaint(toleration *Toleration, taint *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 == TolerationOpEqual) && toleration.Value == taint.Value {
+ return true
+ }
+ if toleration.Operator == TolerationOpExists {
+ return true
+ }
+ return false
+
+}
+
+// TaintToleratedByTolerations checks if taint is tolerated by any of the tolerations.
+func TaintToleratedByTolerations(taint *Taint, tolerations []Toleration) bool {
+ tolerated := false
+ for i := range tolerations {
+ if TolerationToleratesTaint(&tolerations[i], taint) {
+ tolerated = true
+ break
+ }
+ }
+ return tolerated
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/install/install.go
new file mode 100644
index 0000000..937920d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/install/install.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 install installs the v1 monolithic api, making it available as an
+// option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/api"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", api.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+// userResources is a group of resources mostly used by a kubectl user
+var userResources = []string{"rc", "svc", "pods", "pvc"}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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(
+ "Node",
+ "Namespace",
+ "PersistentVolume",
+ "ComponentStatus",
+ )
+
+ // these kinds should be excluded from the list of resources
+ ignoredKinds := sets.NewString(
+ "ListOptions",
+ "DeleteOptions",
+ "Status",
+ "PodLogOptions",
+ "PodExecOptions",
+ "PodAttachOptions",
+ "PodProxyOptions",
+ "NodeProxyOptions",
+ "ServiceProxyOptions",
+ "ThirdPartyResource",
+ "ThirdPartyResourceData",
+ "ThirdPartyResourceList")
+
+ mapper := api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+ // setup aliases for groups of resources
+ mapper.AddResourceAlias("all", userResources...)
+
+ return mapper
+}
+
+// InterfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(api.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ api.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1.SchemeGroupVersion:
+ v1.AddToScheme(api.Scheme)
+ }
+ }
+
+ // 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
+ api.Scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
+ switch a := objA.(type) {
+ case *v1.Pod:
+ switch b := objB.(type) {
+ case *api.Pod:
+ return true, v1.Convert_v1_Pod_To_api_Pod(a, b, s)
+ }
+ case *api.Pod:
+ switch b := objB.(type) {
+ case *v1.Pod:
+ return true, v1.Convert_api_Pod_To_v1_Pod(a, b, s)
+ }
+
+ case *v1.Event:
+ switch b := objB.(type) {
+ case *api.Event:
+ return true, v1.Convert_v1_Event_To_api_Event(a, b, s)
+ }
+ case *api.Event:
+ switch b := objB.(type) {
+ case *v1.Event:
+ return true, v1.Convert_api_Event_To_v1_Event(a, b, s)
+ }
+
+ case *v1.ReplicationController:
+ switch b := objB.(type) {
+ case *api.ReplicationController:
+ return true, v1.Convert_v1_ReplicationController_To_api_ReplicationController(a, b, s)
+ }
+ case *api.ReplicationController:
+ switch b := objB.(type) {
+ case *v1.ReplicationController:
+ return true, v1.Convert_api_ReplicationController_To_v1_ReplicationController(a, b, s)
+ }
+
+ case *v1.Node:
+ switch b := objB.(type) {
+ case *api.Node:
+ return true, v1.Convert_v1_Node_To_api_Node(a, b, s)
+ }
+ case *api.Node:
+ switch b := objB.(type) {
+ case *v1.Node:
+ return true, v1.Convert_api_Node_To_v1_Node(a, b, s)
+ }
+
+ case *v1.Namespace:
+ switch b := objB.(type) {
+ case *api.Namespace:
+ return true, v1.Convert_v1_Namespace_To_api_Namespace(a, b, s)
+ }
+ case *api.Namespace:
+ switch b := objB.(type) {
+ case *v1.Namespace:
+ return true, v1.Convert_api_Namespace_To_v1_Namespace(a, b, s)
+ }
+
+ case *v1.Service:
+ switch b := objB.(type) {
+ case *api.Service:
+ return true, v1.Convert_v1_Service_To_api_Service(a, b, s)
+ }
+ case *api.Service:
+ switch b := objB.(type) {
+ case *v1.Service:
+ return true, v1.Convert_api_Service_To_v1_Service(a, b, s)
+ }
+
+ case *v1.Endpoints:
+ switch b := objB.(type) {
+ case *api.Endpoints:
+ return true, v1.Convert_v1_Endpoints_To_api_Endpoints(a, b, s)
+ }
+ case *api.Endpoints:
+ switch b := objB.(type) {
+ case *v1.Endpoints:
+ return true, v1.Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
+ }
+
+ case *versioned.Event:
+ switch b := objB.(type) {
+ case *versioned.InternalEvent:
+ return true, versioned.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
+ }
+ case *versioned.InternalEvent:
+ switch b := objB.(type) {
+ case *versioned.Event:
+ return true, versioned.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
+ }
+ }
+ return false, nil
+ })
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/mapper.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/mapper.go
new file mode 100644
index 0000000..60addca
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/mapper.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 api
+
+import (
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+var RESTMapper meta.RESTMapper
+
+func init() {
+ RESTMapper = meta.MultiRESTMapper{}
+}
+
+func RegisterRESTMapper(m meta.RESTMapper) {
+ RESTMapper = append(RESTMapper.(meta.MultiRESTMapper), m)
+}
+
+func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, interfacesFunc meta.VersionInterfacesFunc,
+ importPathPrefix string, ignoredKinds, rootScoped sets.String) *meta.DefaultRESTMapper {
+
+ mapper := meta.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 := meta.RESTScopeNamespace
+ if rootScoped.Has(kind) {
+ scope = meta.RESTScopeRoot
+ }
+ mapper.Add(gvk, scope)
+ }
+ }
+ return mapper
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta.go
new file mode 100644
index 0000000..7779359
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta.go
@@ -0,0 +1,129 @@
+/*
+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/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/meta/metatypes"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+ "k8s.io/kubernetes/pkg/util"
+)
+
+// FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta.
+func FillObjectMetaSystemFields(ctx Context, meta *ObjectMeta) {
+ meta.CreationTimestamp = unversioned.Now()
+ meta.UID = util.NewUUID()
+ meta.SelfLink = ""
+}
+
+// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.
+func HasObjectMetaSystemFieldValues(meta *ObjectMeta) bool {
+ return !meta.CreationTimestamp.Time.IsZero() ||
+ len(meta.UID) != 0
+}
+
+// ObjectMetaFor returns a pointer to a provided object's ObjectMeta.
+// TODO: allow runtime.Unknown to extract this object
+// TODO: Remove this function and use meta.Accessor() instead.
+func ObjectMetaFor(obj runtime.Object) (*ObjectMeta, error) {
+ v, err := conversion.EnforcePtr(obj)
+ if err != nil {
+ return nil, err
+ }
+ var meta *ObjectMeta
+ err = runtime.FieldPtr(v, "ObjectMeta", &meta)
+ return meta, err
+}
+
+// ListMetaFor returns a pointer to a provided object's ListMeta,
+// or an error if the object does not have that pointer.
+// TODO: allow runtime.Unknown to extract this object
+func ListMetaFor(obj runtime.Object) (*unversioned.ListMeta, error) {
+ v, err := conversion.EnforcePtr(obj)
+ if err != nil {
+ return nil, err
+ }
+ var meta *unversioned.ListMeta
+ err = runtime.FieldPtr(v, "ListMeta", &meta)
+ return meta, err
+}
+
+func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj }
+
+func (obj *ObjectReference) GetObjectKind() unversioned.ObjectKind { return obj }
+
+// Namespace implements meta.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) GetSelfLink() string { return meta.SelfLink }
+func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
+func (meta *ObjectMeta) GetCreationTimestamp() unversioned.Time { return meta.CreationTimestamp }
+func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp unversioned.Time) {
+ meta.CreationTimestamp = creationTimestamp
+}
+func (meta *ObjectMeta) GetDeletionTimestamp() *unversioned.Time { return meta.DeletionTimestamp }
+func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *unversioned.Time) {
+ meta.DeletionTimestamp = deletionTimestamp
+}
+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) GetFinalizers() []string { return meta.Finalizers }
+func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers }
+
+func (meta *ObjectMeta) GetOwnerReferences() []metatypes.OwnerReference {
+ ret := make([]metatypes.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
+ }
+ }
+ return ret
+}
+
+func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference) {
+ 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
+ }
+ }
+ meta.OwnerReferences = newReferences
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go
new file mode 100644
index 0000000..a3b18a5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go
new file mode 100644
index 0000000..dc4ec07
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/errors.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 meta
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// AmbiguousResourceError is returned if the RESTMapper finds multiple matches for a resource
+type AmbiguousResourceError struct {
+ PartialResource unversioned.GroupVersionResource
+
+ MatchingResources []unversioned.GroupVersionResource
+ MatchingKinds []unversioned.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)
+}
+
+func IsAmbiguousResourceError(err error) bool {
+ if err == nil {
+ return false
+ }
+
+ _, ok := err.(*AmbiguousResourceError)
+ return ok
+}
+
+// NoResourceMatchError is returned if the RESTMapper can't find any match for a resource
+type NoResourceMatchError struct {
+ PartialResource unversioned.GroupVersionResource
+}
+
+func (e *NoResourceMatchError) Error() string {
+ return fmt.Sprintf("no matches for %v", e.PartialResource)
+}
+
+func IsNoResourceMatchError(err error) bool {
+ if err == nil {
+ return false
+ }
+
+ _, ok := err.(*NoResourceMatchError)
+ return ok
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/help.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/help.go
new file mode 100644
index 0000000..0d733a5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/help.go
@@ -0,0 +1,134 @@
+/*
+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/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// IsListType returns true if the provided Object has a slice called Items
+func IsListType(obj runtime.Object) bool {
+ _, 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())
+ }
+}
+
+// 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)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go
new file mode 100644
index 0000000..34c51e3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.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 meta
+
+import (
+ "k8s.io/kubernetes/pkg/api/meta/metatypes"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+)
+
+// VersionInterfaces contains the interfaces one should use for dealing with types of a particular version.
+type VersionInterfaces struct {
+ runtime.ObjectConvertor
+ MetadataAccessor
+}
+
+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)
+ GetSelfLink() string
+ SetSelfLink(selfLink string)
+ GetCreationTimestamp() unversioned.Time
+ SetCreationTimestamp(timestamp unversioned.Time)
+ GetDeletionTimestamp() *unversioned.Time
+ SetDeletionTimestamp(timestamp *unversioned.Time)
+ GetLabels() map[string]string
+ SetLabels(labels map[string]string)
+ GetAnnotations() map[string]string
+ SetAnnotations(annotations map[string]string)
+ GetFinalizers() []string
+ SetFinalizers(finalizers []string)
+ GetOwnerReferences() []metatypes.OwnerReference
+ SetOwnerReferences([]metatypes.OwnerReference)
+}
+
+var _ Object = &runtime.Unstructured{}
+
+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 unversioned.List
+
+// Type exposes the type and APIVersion of versioned or internal API objects.
+type Type unversioned.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 unversioned.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(caesarxuchao): Add proper multi-group support so that kinds & resources are
+// scoped to groups. See http://issues.k8s.io/12413 and http://issues.k8s.io/10009.
+type RESTMapper interface {
+ // KindFor takes a partial resource and returns back the single match. Returns an error if there are multiple matches
+ KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error)
+
+ // KindsFor takes a partial resource and returns back the list of potential kinds in priority order
+ KindsFor(resource unversioned.GroupVersionResource) ([]unversioned.GroupVersionKind, error)
+
+ // ResourceFor takes a partial resource and returns back the single match. Returns an error if there are multiple matches
+ ResourceFor(input unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error)
+
+ // ResourcesFor takes a partial resource and returns back the list of potential resource in priority order
+ ResourcesFor(input unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error)
+
+ RESTMapping(gk unversioned.GroupKind, versions ...string) (*RESTMapping, error)
+
+ AliasesForResource(resource string) ([]string, bool)
+ ResourceSingularizer(resource string) (singular string, err error)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go
new file mode 100644
index 0000000..876aa4f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go
@@ -0,0 +1,567 @@
+/*
+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"
+
+ "k8s.io/kubernetes/pkg/api/meta/metatypes"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+
+ "github.com/golang/glog"
+)
+
+// 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 unversioned.List:
+ return t, nil
+ case ListMetaAccessor:
+ if m := t.GetListMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotList
+ case unversioned.ListMetaAccessor:
+ if m := t.GetListMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotList
+ case Object:
+ return t, nil
+ case 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{}) (Object, error) {
+ switch t := obj.(type) {
+ case Object:
+ return t, nil
+ case ObjectMetaAccessor:
+ if m := t.GetObjectMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotObject
+ case List, unversioned.List, ListMetaAccessor, unversioned.ListMetaAccessor:
+ return nil, errNotObject
+ default:
+ return nil, errNotObject
+ }
+}
+
+// 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 := unversioned.ParseGroupVersion(version)
+ if err != nil {
+ gv = unversioned.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 *metatypes.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
+ }
+ return nil
+}
+
+// setOwnerReference sets v to o. v is the OwnerReferences field of an object.
+func setOwnerReference(v reflect.Value, o *metatypes.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
+ }
+ }
+ 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 *unversioned.Time
+ deletionTimestamp **unversioned.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() unversioned.Time {
+ return *a.creationTimestamp
+}
+
+func (a genericAccessor) SetCreationTimestamp(timestamp unversioned.Time) {
+ *a.creationTimestamp = timestamp
+}
+
+func (a genericAccessor) GetDeletionTimestamp() *unversioned.Time {
+ return *a.deletionTimestamp
+}
+
+func (a genericAccessor) SetDeletionTimestamp(timestamp *unversioned.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() []metatypes.OwnerReference {
+ var ret []metatypes.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([]metatypes.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 []metatypes.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go
new file mode 100644
index 0000000..41e6596
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.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.
+*/
+
+// The types defined in this package are used by the meta package to represent
+// the in-memory version of objects. We cannot reuse the __internal version of
+// API objects because it causes import cycle.
+package metatypes
+
+import "k8s.io/kubernetes/pkg/types"
+
+type OwnerReference struct {
+ APIVersion string
+ Kind string
+ UID types.UID
+ Name string
+ Controller *bool
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go
new file mode 100644
index 0000000..790795a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.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 meta
+
+import (
+ "fmt"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ utilerrors "k8s.io/kubernetes/pkg/util/errors"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+// 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 unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) {
+ allGVRs := []unversioned.GroupVersionResource{}
+ for _, t := range m {
+ gvrs, err := t.ResourcesFor(resource)
+ // ignore "no match" errors, but any other error percolates back up
+ if IsNoResourceMatchError(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 unversioned.GroupVersionResource) (gvk []unversioned.GroupVersionKind, err error) {
+ allGVKs := []unversioned.GroupVersionKind{}
+ for _, t := range m {
+ gvks, err := t.KindsFor(resource)
+ // ignore "no match" errors, but any other error percolates back up
+ if IsNoResourceMatchError(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 unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) {
+ resources, err := m.ResourcesFor(resource)
+ if err != nil {
+ return unversioned.GroupVersionResource{}, err
+ }
+ if len(resources) == 1 {
+ return resources[0], nil
+ }
+
+ return unversioned.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources}
+}
+
+func (m MultiRESTMapper) KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) {
+ kinds, err := m.KindsFor(resource)
+ if err != nil {
+ return unversioned.GroupVersionKind{}, err
+ }
+ if len(kinds) == 1 {
+ return kinds[0], nil
+ }
+
+ return unversioned.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 unversioned.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 IsNoResourceMatchError(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 {
+ return nil, fmt.Errorf("multiple matches found for %v in %v", gk, versions)
+ }
+ if len(errors) > 0 {
+ return nil, utilerrors.NewAggregate(errors)
+ }
+ return nil, fmt.Errorf("no match found for %v in %v", gk, versions)
+}
+
+// AliasesForResource finds the first alias response for the provided mappers.
+func (m MultiRESTMapper) AliasesForResource(alias string) ([]string, bool) {
+ seenAliases := sets.NewString()
+ allAliases := []string{}
+ handled := false
+
+ for _, t := range m {
+ if currAliases, currOk := t.AliasesForResource(alias); currOk {
+ for _, currAlias := range currAliases {
+ if !seenAliases.Has(currAlias) {
+ allAliases = append(allAliases, currAlias)
+ seenAliases.Insert(currAlias)
+ }
+ }
+ handled = true
+ }
+ }
+ return allAliases, handled
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go
new file mode 100644
index 0000000..1e44e45
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go
@@ -0,0 +1,173 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+)
+
+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 []unversioned.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 []unversioned.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 unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) {
+ originalGVRs, err := m.Delegate.ResourcesFor(partiallySpecifiedResource)
+ if err != nil {
+ return unversioned.GroupVersionResource{}, err
+ }
+ if len(originalGVRs) == 1 {
+ return originalGVRs[0], nil
+ }
+
+ remainingGVRs := append([]unversioned.GroupVersionResource{}, originalGVRs...)
+ for _, pattern := range m.ResourcePriority {
+ matchedGVRs := []unversioned.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 unversioned.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 unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) {
+ originalGVKs, err := m.Delegate.KindsFor(partiallySpecifiedResource)
+ if err != nil {
+ return unversioned.GroupVersionKind{}, err
+ }
+ if len(originalGVKs) == 1 {
+ return originalGVKs[0], nil
+ }
+
+ remainingGVKs := append([]unversioned.GroupVersionKind{}, originalGVKs...)
+ for _, pattern := range m.KindPriority {
+ matchedGVKs := []unversioned.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 unversioned.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingKinds: originalGVKs}
+}
+
+func resourceMatches(pattern unversioned.GroupVersionResource, resource unversioned.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 unversioned.GroupVersionKind, kind unversioned.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 unversioned.GroupKind, versions ...string) (mapping *RESTMapping, err error) {
+ return m.Delegate.RESTMapping(gk, versions...)
+}
+
+func (m PriorityRESTMapper) AliasesForResource(alias string) (aliases []string, ok bool) {
+ return m.Delegate.AliasesForResource(alias)
+}
+
+func (m PriorityRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
+ return m.Delegate.ResourceSingularizer(resource)
+}
+
+func (m PriorityRESTMapper) ResourcesFor(partiallySpecifiedResource unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) {
+ return m.Delegate.ResourcesFor(partiallySpecifiedResource)
+}
+
+func (m PriorityRESTMapper) KindsFor(partiallySpecifiedResource unversioned.GroupVersionResource) (gvk []unversioned.GroupVersionKind, err error) {
+ return m.Delegate.KindsFor(partiallySpecifiedResource)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go
new file mode 100644
index 0000000..bf2567e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go
@@ -0,0 +1,520 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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 []unversioned.GroupVersion
+
+ resourceToKind map[unversioned.GroupVersionResource]unversioned.GroupVersionKind
+ kindToPluralResource map[unversioned.GroupVersionKind]unversioned.GroupVersionResource
+ kindToScope map[unversioned.GroupVersionKind]RESTScope
+ singularToPlural map[unversioned.GroupVersionResource]unversioned.GroupVersionResource
+ pluralToSingular map[unversioned.GroupVersionResource]unversioned.GroupVersionResource
+
+ interfacesFunc VersionInterfacesFunc
+
+ // aliasToResource is used for mapping aliases to resources
+ aliasToResource map[string][]string
+}
+
+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 unversioned.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 []unversioned.GroupVersion, f VersionInterfacesFunc) *DefaultRESTMapper {
+ resourceToKind := make(map[unversioned.GroupVersionResource]unversioned.GroupVersionKind)
+ kindToPluralResource := make(map[unversioned.GroupVersionKind]unversioned.GroupVersionResource)
+ kindToScope := make(map[unversioned.GroupVersionKind]RESTScope)
+ singularToPlural := make(map[unversioned.GroupVersionResource]unversioned.GroupVersionResource)
+ pluralToSingular := make(map[unversioned.GroupVersionResource]unversioned.GroupVersionResource)
+ aliasToResource := make(map[string][]string)
+ // TODO: verify name mappings work correctly when versions differ
+
+ return &DefaultRESTMapper{
+ resourceToKind: resourceToKind,
+ kindToPluralResource: kindToPluralResource,
+ kindToScope: kindToScope,
+ defaultGroupVersions: defaultGroupVersions,
+ singularToPlural: singularToPlural,
+ pluralToSingular: pluralToSingular,
+ aliasToResource: aliasToResource,
+ interfacesFunc: f,
+ }
+}
+
+func (m *DefaultRESTMapper) Add(kind unversioned.GroupVersionKind, scope RESTScope) {
+ plural, singular := KindToResource(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",
+}
+
+// KindToResource 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 KindToResource(kind unversioned.GroupVersionKind) ( /*plural*/ unversioned.GroupVersionResource /*singular*/, unversioned.GroupVersionResource) {
+ kindName := kind.Kind
+ if len(kindName) == 0 {
+ return unversioned.GroupVersionResource{}, unversioned.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 := unversioned.GroupVersionResource{Resource: resourceType}
+ resources, err := m.ResourcesFor(partialResource)
+ if err != nil {
+ return resourceType, err
+ }
+
+ singular := unversioned.GroupVersionResource{}
+ for _, curr := range resources {
+ currSingular, ok := m.pluralToSingular[curr]
+ if !ok {
+ continue
+ }
+ if singular.IsEmpty() {
+ singular = currSingular
+ continue
+ }
+
+ if currSingular.Resource != singular.Resource {
+ return resourceType, fmt.Errorf("multiple possibile singular resources (%v) found for %v", resources, resourceType)
+ }
+ }
+
+ if singular.IsEmpty() {
+ 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 unversioned.GroupVersionResource) unversioned.GroupVersionResource {
+ resource.Resource = strings.ToLower(resource.Resource)
+ if resource.Version == runtime.APIVersionInternal {
+ resource.Version = ""
+ }
+
+ return resource
+}
+
+func (m *DefaultRESTMapper) ResourcesFor(input unversioned.GroupVersionResource) ([]unversioned.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 := []unversioned.GroupVersionResource{}
+ switch {
+ // fully qualified. Find the exact match
+ case hasGroup && hasVersion:
+ for plural, singular := range m.pluralToSingular {
+ if singular == resource {
+ ret = append(ret, plural)
+ break
+ }
+ if plural == resource {
+ ret = append(ret, plural)
+ break
+ }
+ }
+
+ case hasGroup:
+ requestedGroupResource := resource.GroupResource()
+ for plural, singular := range m.pluralToSingular {
+ if singular.GroupResource() == requestedGroupResource {
+ ret = append(ret, plural)
+ }
+ if plural.GroupResource() == requestedGroupResource {
+ 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 unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) {
+ resources, err := m.ResourcesFor(resource)
+ if err != nil {
+ return unversioned.GroupVersionResource{}, err
+ }
+ if len(resources) == 1 {
+ return resources[0], nil
+ }
+
+ return unversioned.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources}
+}
+
+func (m *DefaultRESTMapper) KindsFor(input unversioned.GroupVersionResource) ([]unversioned.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 := []unversioned.GroupVersionKind{}
+ switch {
+ // fully qualified. Find the exact match
+ case hasGroup && hasVersion:
+ kind, exists := m.resourceToKind[resource]
+ if exists {
+ ret = append(ret, kind)
+ }
+
+ case hasGroup:
+ requestedGroupResource := resource.GroupResource()
+ for currResource, currKind := range m.resourceToKind {
+ if currResource.GroupResource() == requestedGroupResource {
+ 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 unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) {
+ kinds, err := m.KindsFor(resource)
+ if err != nil {
+ return unversioned.GroupVersionKind{}, err
+ }
+ if len(kinds) == 1 {
+ return kinds[0], nil
+ }
+
+ return unversioned.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds}
+}
+
+type kindByPreferredGroupVersion struct {
+ list []unversioned.GroupVersionKind
+ sortOrder []unversioned.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 []unversioned.GroupVersionResource
+ sortOrder []unversioned.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 unversioned.GroupKind, versions ...string) (*RESTMapping, error) {
+ // Pick an appropriate version
+ var gvk *unversioned.GroupVersionKind
+ hadVersion := false
+ for _, version := range versions {
+ if len(version) == 0 || version == runtime.APIVersionInternal {
+ continue
+ }
+
+ currGVK := gk.WithVersion(version)
+ hadVersion = true
+ if _, ok := m.kindToPluralResource[currGVK]; ok {
+ gvk = &currGVK
+ break
+ }
+ }
+ // Use the default preferred versions
+ if !hadVersion && (gvk == nil) {
+ for _, gv := range m.defaultGroupVersions {
+ if gv.Group != gk.Group {
+ continue
+ }
+
+ currGVK := gk.WithVersion(gv.Version)
+ if _, ok := m.kindToPluralResource[currGVK]; ok {
+ gvk = &currGVK
+ break
+ }
+ }
+ }
+ if gvk == nil {
+ return nil, fmt.Errorf("no kind named %q is registered in versions %q", gk, versions)
+ }
+
+ // Ensure we have a REST mapping
+ resource, ok := m.kindToPluralResource[*gvk]
+ if !ok {
+ found := []unversioned.GroupVersion{}
+ for _, gv := range m.defaultGroupVersions {
+ if _, ok := m.kindToPluralResource[*gvk]; ok {
+ found = append(found, gv)
+ }
+ }
+ if len(found) > 0 {
+ return nil, fmt.Errorf("object with kind %q exists in versions %v, not %v", gvk.Kind, found, gvk.GroupVersion().String())
+ }
+ return nil, fmt.Errorf("the provided version %q and kind %q cannot be mapped to a supported object", gvk.GroupVersion().String(), gvk.Kind)
+ }
+
+ // 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().String(), gvk.Kind)
+ }
+
+ interfaces, err := m.interfacesFunc(gvk.GroupVersion())
+ if err != nil {
+ return nil, fmt.Errorf("the provided version %q has no relevant versions", gvk.GroupVersion().String())
+ }
+
+ retVal := &RESTMapping{
+ Resource: resource.Resource,
+ GroupVersionKind: *gvk,
+ Scope: scope,
+
+ ObjectConvertor: interfaces.ObjectConvertor,
+ MetadataAccessor: interfaces.MetadataAccessor,
+ }
+
+ return retVal, nil
+}
+
+// AddResourceAlias maps aliases to resources
+func (m *DefaultRESTMapper) AddResourceAlias(alias string, resources ...string) {
+ if len(resources) == 0 {
+ return
+ }
+ m.aliasToResource[alias] = resources
+}
+
+// AliasesForResource returns whether a resource has an alias or not
+func (m *DefaultRESTMapper) AliasesForResource(alias string) ([]string, bool) {
+ if res, ok := m.aliasToResource[alias]; ok {
+ return res, true
+ }
+ return nil, false
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/node_example.json b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/node_example.json
new file mode 100644
index 0000000..2601834
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/node_example.json
@@ -0,0 +1,49 @@
+{
+ "kind": "Node",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "e2e-test-wojtekt-minion-etd6",
+ "selfLink": "/api/v1/nodes/e2e-test-wojtekt-minion-etd6",
+ "uid": "a7e89222-e8e5-11e4-8fde-42010af09327",
+ "resourceVersion": "379",
+ "creationTimestamp": "2015-04-22T11:49:39Z"
+ },
+ "spec": {
+ "externalID": "15488322946290398375"
+ },
+ "status": {
+ "capacity": {
+ "cpu": "1",
+ "memory": "1745152Ki"
+ },
+ "conditions": [
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastHeartbeatTime": "2015-04-22T11:58:17Z",
+ "lastTransitionTime": "2015-04-22T11:49:52Z",
+ "reason": "kubelet is posting ready status"
+ }
+ ],
+ "addresses": [
+ {
+ "type": "ExternalIP",
+ "address": "104.197.49.213"
+ },
+ {
+ "type": "LegacyHostIP",
+ "address": "104.197.20.11"
+ }
+ ],
+ "nodeInfo": {
+ "machineID": "",
+ "systemUUID": "D59FA3FA-7B5B-7287-5E1A-1D79F13CB577",
+ "bootID": "44a832f3-8cfb-4de5-b7d2-d66030b6cd95",
+ "kernelVersion": "3.16.0-0.bpo.4-amd64",
+ "osImage": "Debian GNU/Linux 7 (wheezy)",
+ "containerRuntimeVersion": "docker://1.5.0",
+ "kubeletVersion": "v0.15.0-484-g0c8ee980d705a3-dirty",
+ "kubeProxyVersion": "v0.15.0-484-g0c8ee980d705a3-dirty"
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod/util.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod/util.go
new file mode 100644
index 0000000..cd6f9fb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod/util.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 pod
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+const (
+ // TODO: to be de!eted after v1.3 is released. PodSpec has a dedicated Hostname field.
+ // The annotation value is a string specifying the hostname to be used for the pod e.g 'my-webserver-1'
+ PodHostnameAnnotation = "pod.beta.kubernetes.io/hostname"
+
+ // TODO: to be de!eted after v1.3 is released. PodSpec has a dedicated Subdomain field.
+ // The annotation value is a string specifying the subdomain e.g. "my-web-service"
+ // If specified, on the the pod itself, "<hostname>.my-web-service.<namespace>.svc.<cluster domain>" would resolve to
+ // the pod's IP.
+ // If there is a headless service named "my-web-service" in the same namespace as the pod, then,
+ // <hostname>.my-web-service.<namespace>.svc.<cluster domain>" would be resolved by the cluster DNS Server.
+ PodSubdomainAnnotation = "pod.beta.kubernetes.io/subdomain"
+)
+
+// 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 *api.Pod, svcPort *api.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)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod_example.json b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod_example.json
new file mode 100644
index 0000000..8284240
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/pod_example.json
@@ -0,0 +1,102 @@
+{
+ "kind": "Pod",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "etcd-server-e2e-test-wojtekt-master",
+ "namespace": "default",
+ "selfLink": "/api/v1/namespaces/default/pods/etcd-server-e2e-test-wojtekt-master",
+ "uid": "a671734a-e8e5-11e4-8fde-42010af09327",
+ "resourceVersion": "22",
+ "creationTimestamp": "2015-04-22T11:49:36Z",
+ "annotations": {
+ "kubernetes.io/config.mirror": "mirror",
+ "kubernetes.io/config.source": "file"
+ }
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "varetcd",
+ "hostPath": {
+ "path": "/mnt/master-pd/var/etcd"
+ },
+ "emptyDir": null,
+ "gcePersistentDisk": null,
+ "awsElasticBlockStore": null,
+ "gitRepo": null,
+ "secret": null,
+ "nfs": null,
+ "iscsi": null,
+ "glusterfs": null
+ }
+ ],
+ "containers": [
+ {
+ "name": "etcd-container",
+ "image": "gcr.io/google_containers/etcd:2.0.9",
+ "command": [
+ "/usr/local/bin/etcd",
+ "--addr",
+ "127.0.0.1:4001",
+ "--bind-addr",
+ "127.0.0.1:4001",
+ "--data-dir",
+ "/var/etcd/data"
+ ],
+ "ports": [
+ {
+ "name": "serverport",
+ "hostPort": 2380,
+ "containerPort": 2380,
+ "protocol": "TCP"
+ },
+ {
+ "name": "clientport",
+ "hostPort": 4001,
+ "containerPort": 4001,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "volumeMounts": [
+ {
+ "name": "varetcd",
+ "mountPath": "/var/etcd"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent",
+ "capabilities": {}
+ }
+ ],
+ "restartPolicy": "Always",
+ "dnsPolicy": "ClusterFirst",
+ "nodeName": "e2e-test-wojtekt-master",
+ "hostNetwork": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Ready",
+ "status": "True"
+ }
+ ],
+ "containerStatuses": [
+ {
+ "name": "etcd-container",
+ "state": {
+ "running": {
+ "startedAt": "2015-04-22T11:49:32Z"
+ }
+ },
+ "lastState": {},
+ "ready": true,
+ "restartCount": 0,
+ "image": "gcr.io/google_containers/etcd:2.0.9",
+ "imageID": "docker://b6b9a86dc06aa1361357ca1b105feba961f6a4145adca6c54e142c0be0fe87b0",
+ "containerID": "docker://3cbbf818f1addfc252957b4504f56ef2907a313fe6afc47fc75373674255d46d"
+ }
+ ]
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/ref.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/ref.go
new file mode 100644
index 0000000..b864593
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/ref.go
@@ -0,0 +1,130 @@
+/*
+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 (
+ "errors"
+ "fmt"
+ "net/url"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+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(obj runtime.Object) (*ObjectReference, error) {
+ if obj == nil {
+ return nil, ErrNilObject
+ }
+ if ref, ok := obj.(*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 &ObjectReference{
+ Kind: kind,
+ APIVersion: version,
+ ResourceVersion: listMeta.GetResourceVersion(),
+ }, nil
+ }
+
+ return &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(obj runtime.Object, fieldPath string) (*ObjectReference, error) {
+ ref, err := GetReference(obj)
+ if err != nil {
+ return nil, err
+ }
+ ref.FieldPath = fieldPath
+ return ref, nil
+}
+
+// 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 unversioned.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+func (obj *ObjectReference) GroupVersionKind() unversioned.GroupVersionKind {
+ return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/register.go
new file mode 100644
index 0000000..6b1ed75
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/register.go
@@ -0,0 +1,115 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer"
+)
+
+// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
+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 = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Unversiond is group version for unversioned API objects
+// TODO: this should be v1 probably
+var Unversioned = unversioned.GroupVersion{Group: "", Version: "v1"}
+
+// ParameterCodec handles versioning of objects that are converted to query parameters.
+var ParameterCodec = runtime.NewParameterCodec(Scheme)
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ if err := Scheme.AddIgnoredConversionType(&unversioned.TypeMeta{}, &unversioned.TypeMeta{}); err != nil {
+ panic(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{},
+ &DeleteOptions{},
+ &ListOptions{},
+ &PodAttachOptions{},
+ &PodLogOptions{},
+ &PodExecOptions{},
+ &PodProxyOptions{},
+ &ComponentStatus{},
+ &ComponentStatusList{},
+ &SerializedReference{},
+ &RangeAllocation{},
+ &ConfigMap{},
+ &ConfigMapList{},
+ )
+
+ // Register Unversioned types under their own special group
+ Scheme.AddUnversionedTypes(Unversioned,
+ &unversioned.ExportOptions{},
+ &unversioned.Status{},
+ &unversioned.APIVersions{},
+ &unversioned.APIGroupList{},
+ &unversioned.APIGroup{},
+ &unversioned.APIResourceList{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json
new file mode 100644
index 0000000..5c3c4fe
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json
@@ -0,0 +1,82 @@
+{
+ "kind": "ReplicationController",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "elasticsearch-logging-controller",
+ "namespace": "default",
+ "selfLink": "/api/v1/namespaces/default/replicationcontrollers/elasticsearch-logging-controller",
+ "uid": "aa76f162-e8e5-11e4-8fde-42010af09327",
+ "resourceVersion": "98",
+ "creationTimestamp": "2015-04-22T11:49:43Z",
+ "labels": {
+ "kubernetes.io/cluster-service": "true",
+ "name": "elasticsearch-logging"
+ }
+ },
+ "spec": {
+ "replicas": 1,
+ "selector": {
+ "name": "elasticsearch-logging"
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "kubernetes.io/cluster-service": "true",
+ "name": "elasticsearch-logging"
+ }
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "es-persistent-storage",
+ "hostPath": null,
+ "emptyDir": {
+ "medium": ""
+ },
+ "gcePersistentDisk": null,
+ "awsElasticBlockStore": null,
+ "gitRepo": null,
+ "secret": null,
+ "nfs": null,
+ "iscsi": null,
+ "glusterfs": null
+ }
+ ],
+ "containers": [
+ {
+ "name": "elasticsearch-logging",
+ "image": "gcr.io/google_containers/elasticsearch:1.0",
+ "ports": [
+ {
+ "name": "db",
+ "containerPort": 9200,
+ "protocol": "TCP"
+ },
+ {
+ "name": "transport",
+ "containerPort": 9300,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "volumeMounts": [
+ {
+ "name": "es-persistent-storage",
+ "mountPath": "/data"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent",
+ "capabilities": {}
+ }
+ ],
+ "restartPolicy": "Always",
+ "dnsPolicy": "ClusterFirst"
+ }
+ }
+ },
+ "status": {
+ "replicas": 1
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go
new file mode 100644
index 0000000..14983b2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go
@@ -0,0 +1,115 @@
+/*
+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 (
+ "errors"
+ "net/http"
+ "sync"
+)
+
+// RequestContextMapper keeps track of the context associated with a particular request
+type RequestContextMapper interface {
+ // Get returns the context associated with the given request (if any), and true if the request has an associated context, and false if it does not.
+ Get(req *http.Request) (Context, bool)
+ // Update maps the request to the given context. If no context was previously associated with the request, an error is returned.
+ // Update should only be called with a descendant context of the previously associated context.
+ // Updating to an unrelated context may return an error in the future.
+ // The context associated with a request should only be updated by a limited set of callers.
+ // Valid examples include the authentication layer, or an audit/tracing layer.
+ Update(req *http.Request, context Context) error
+}
+
+type requestContextMap struct {
+ contexts map[*http.Request]Context
+ lock sync.Mutex
+}
+
+// NewRequestContextMapper returns a new RequestContextMapper.
+// The returned mapper must be added as a request filter using NewRequestContextFilter.
+func NewRequestContextMapper() RequestContextMapper {
+ return &requestContextMap{
+ contexts: make(map[*http.Request]Context),
+ }
+}
+
+// Get returns the context associated with the given request (if any), and true if the request has an associated context, and false if it does not.
+// Get will only return a valid context when called from inside the filter chain set up by NewRequestContextFilter()
+func (c *requestContextMap) Get(req *http.Request) (Context, bool) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ context, ok := c.contexts[req]
+ return context, ok
+}
+
+// Update maps the request to the given context.
+// If no context was previously associated with the request, an error is returned and the context is ignored.
+func (c *requestContextMap) Update(req *http.Request, context Context) error {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ if _, ok := c.contexts[req]; !ok {
+ return errors.New("No context associated")
+ }
+ // TODO: ensure the new context is a descendant of the existing one
+ c.contexts[req] = context
+ return nil
+}
+
+// init maps the request to the given context and returns true if there was no context associated with the request already.
+// if a context was already associated with the request, it ignores the given context and returns false.
+// init is intentionally unexported to ensure that all init calls are paired with a remove after a request is handled
+func (c *requestContextMap) init(req *http.Request, context Context) bool {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ if _, exists := c.contexts[req]; exists {
+ return false
+ }
+ c.contexts[req] = context
+ return true
+}
+
+// remove is intentionally unexported to ensure that the context is not removed until a request is handled
+func (c *requestContextMap) remove(req *http.Request) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ delete(c.contexts, req)
+}
+
+// NewRequestContextFilter ensures there is a Context object associated with the request before calling the passed handler.
+// After the passed handler runs, the context is cleaned up.
+func NewRequestContextFilter(mapper RequestContextMapper, handler http.Handler) (http.Handler, error) {
+ if mapper, ok := mapper.(*requestContextMap); ok {
+ return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
+ if mapper.init(req, NewContext()) {
+ // If we were the ones to successfully initialize, pair with a remove
+ defer mapper.remove(req)
+ }
+ handler.ServeHTTP(w, req)
+ }), nil
+ } else {
+ return handler, errors.New("Unknown RequestContextMapper implementation.")
+ }
+
+}
+
+// IsEmpty returns true if there are no contexts registered, or an error if it could not be determined. Intended for use by tests.
+func IsEmpty(requestsToContexts RequestContextMapper) (bool, error) {
+ if requestsToContexts, ok := requestsToContexts.(*requestContextMap); ok {
+ return len(requestsToContexts.contexts) == 0, nil
+ }
+ return true, errors.New("Unknown RequestContextMapper implementation")
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go
new file mode 100644
index 0000000..2d3012c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go
@@ -0,0 +1,298 @@
+/*
+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.
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go
new file mode 100644
index 0000000..f091cde
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.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.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/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/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
+
+func (m *Quantity) Reset() { *m = Quantity{} }
+func (*Quantity) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*Quantity)(nil), "k8s.io.kubernetes.pkg.api.resource.Quantity")
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto
new file mode 100644
index 0000000..bdc091d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto
@@ -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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.api.resource;
+
+import "k8s.io/kubernetes/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
+message Quantity {
+ optional string string = 1;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/math.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/math.go
new file mode 100644
index 0000000..887ac74
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/math.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 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
+ }
+}
+
+// powInt64 raises a to the bth power. Is not overflow aware.
+func powInt64(a, b int64) int64 {
+ p := int64(1)
+ for b > 0 {
+ if b&1 != 0 {
+ p *= a
+ }
+ b >>= 1
+ a *= a
+ }
+ return p
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go
new file mode 100644
index 0000000..823dd5e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go
@@ -0,0 +1,777 @@
+/*
+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"
+
+ inf "gopkg.in/inf.v0"
+)
+
+// 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
+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
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go
new file mode 100644
index 0000000..74dfb4e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go
new file mode 100644
index 0000000..55e177b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go
new file mode 100644
index 0000000..5ed7abe
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go
new file mode 100644
index 0000000..2c683da
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go
@@ -0,0 +1,209 @@
+/*
+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/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// 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 GetContainerStatus(statuses []ContainerStatus, name string) (ContainerStatus, bool) {
+ for i := range statuses {
+ if statuses[i].Name == name {
+ return statuses[i], true
+ }
+ }
+ return ContainerStatus{}, false
+}
+
+func GetExistingContainerStatus(statuses []ContainerStatus, name string) ContainerStatus {
+ for i := range statuses {
+ if statuses[i].Name == name {
+ return statuses[i]
+ }
+ }
+ return ContainerStatus{}
+}
+
+// IsPodReady returns true if a pod is ready; false otherwise.
+func IsPodReady(pod *Pod) bool {
+ return IsPodReadyConditionTrue(pod.Status)
+}
+
+// IsPodReady retruns true if a pod is ready; false otherwise.
+func IsPodReadyConditionTrue(status PodStatus) bool {
+ condition := GetPodReadyCondition(status)
+ return condition != nil && condition.Status == ConditionTrue
+}
+
+// Extracts the pod ready condition from the given status and returns that.
+// Returns nil if the condition is not present.
+func GetPodReadyCondition(status PodStatus) *PodCondition {
+ _, condition := GetPodCondition(&status, 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 the index of the located condition.
+func GetPodCondition(status *PodStatus, conditionType PodConditionType) (int, *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
+}
+
+// GetNodeCondition extracts the provided condition from the given status and returns that.
+// Returns nil and -1 if the condition is not present, and the the index of the located condition.
+func GetNodeCondition(status *NodeStatus, conditionType NodeConditionType) (int, *NodeCondition) {
+ 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 *PodStatus, condition *PodCondition) bool {
+ condition.LastTransitionTime = unversioned.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
+ }
+}
+
+// IsNodeReady returns true if a node is ready; false otherwise.
+func IsNodeReady(node *Node) bool {
+ for _, c := range node.Status.Conditions {
+ if c.Type == NodeReady {
+ return c.Status == ConditionTrue
+ }
+ }
+ return false
+}
+
+// PodRequestsAndLimits returns a dictionary of all defined resources summed up for all
+// containers of the pod.
+func PodRequestsAndLimits(pod *Pod) (reqs map[ResourceName]resource.Quantity, limits map[ResourceName]resource.Quantity, err error) {
+ reqs, limits = map[ResourceName]resource.Quantity{}, map[ResourceName]resource.Quantity{}
+ for _, container := range pod.Spec.Containers {
+ for name, quantity := range container.Resources.Requests {
+ if value, ok := reqs[name]; !ok {
+ reqs[name] = *quantity.Copy()
+ } else {
+ value.Add(quantity)
+ reqs[name] = value
+ }
+ }
+ for name, quantity := range container.Resources.Limits {
+ if value, ok := limits[name]; !ok {
+ limits[name] = *quantity.Copy()
+ } else {
+ value.Add(quantity)
+ limits[name] = value
+ }
+ }
+ }
+ // init containers define the minimum of any resource
+ for _, container := range pod.Spec.InitContainers {
+ for name, quantity := range container.Resources.Requests {
+ value, ok := reqs[name]
+ if !ok {
+ reqs[name] = *quantity.Copy()
+ continue
+ }
+ if quantity.Cmp(value) > 0 {
+ reqs[name] = *quantity.Copy()
+ }
+ }
+ for name, quantity := range container.Resources.Limits {
+ value, ok := limits[name]
+ if !ok {
+ limits[name] = *quantity.Copy()
+ continue
+ }
+ if quantity.Cmp(value) > 0 {
+ limits[name] = *quantity.Copy()
+ }
+ }
+ }
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go
new file mode 100644
index 0000000..ee275d3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/annotations.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.
+*/
+
+package service
+
+const (
+ // 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"
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/util.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/util.go
new file mode 100644
index 0000000..6f0e14e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/service/util.go
@@ -0,0 +1,68 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api"
+ netsets "k8s.io/kubernetes/pkg/util/net/sets"
+)
+
+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[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", AnnotationLoadBalancerSourceRangesKey, val)
+ }
+ }
+ return ipnets, nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.generated.go
new file mode 100644
index 0000000..67d3dbc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.generated.go
@@ -0,0 +1,59756 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 api
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_resource "k8s.io/kubernetes/pkg/api/resource"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg6_fields "k8s.io/kubernetes/pkg/fields"
+ pkg5_labels "k8s.io/kubernetes/pkg/labels"
+ pkg7_runtime "k8s.io/kubernetes/pkg/runtime"
+ pkg1_types "k8s.io/kubernetes/pkg/types"
+ pkg4_intstr "k8s.io/kubernetes/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_unversioned.Time
+ var v2 pkg6_fields.Selector
+ var v3 pkg5_labels.Selector
+ var v4 pkg7_runtime.Object
+ var v5 pkg1_types.UID
+ var v6 pkg4_intstr.IntOrString
+ var v7 time.Time
+ _, _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6, v7
+ }
+}
+
+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 [14]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] = len(x.Finalizers) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ 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.encSliceOwnerReference(([]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.encSliceOwnerReference(([]OwnerReference)(x.OwnerReferences), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym48 := z.EncBinary()
+ _ = yym48
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ }
+ }
+ 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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "generateName":
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ x.GenerateName = string(r.DecodeString())
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(r.DecodeString())
+ }
+ case "selfLink":
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ x.SelfLink = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "generation":
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ x.Generation = int64(r.DecodeInt(64))
+ }
+ case "creationTimestamp":
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv11 := &x.CreationTimestamp
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(yyv11)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ case "deletionTimestamp":
+ if r.TryDecodeAsNil() {
+ if x.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_unversioned.Time)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym14 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym14 && 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)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "labels":
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv17 := &x.Labels
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv17, false, d)
+ }
+ }
+ case "annotations":
+ if r.TryDecodeAsNil() {
+ x.Annotations = nil
+ } else {
+ yyv19 := &x.Annotations
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv19, false, d)
+ }
+ }
+ case "ownerReferences":
+ if r.TryDecodeAsNil() {
+ x.OwnerReferences = nil
+ } else {
+ yyv21 := &x.OwnerReferences
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.decSliceOwnerReference((*[]OwnerReference)(yyv21), d)
+ }
+ }
+ case "finalizers":
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv23 := &x.Finalizers
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, false, d)
+ }
+ }
+ 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 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() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ x.GenerateName = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ x.SelfLink = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ x.Generation = int64(r.DecodeInt(64))
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv33 := &x.CreationTimestamp
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv33) {
+ } else if yym34 {
+ z.DecBinaryUnmarshal(yyv33)
+ } else if !yym34 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv33)
+ } else {
+ z.DecFallback(yyv33, false)
+ }
+ }
+ 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.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_unversioned.Time)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym36 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym36 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.DeletionTimestamp)
+ } else {
+ z.DecFallback(x.DeletionTimestamp, false)
+ }
+ }
+ 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.DeletionGracePeriodSeconds != nil {
+ x.DeletionGracePeriodSeconds = nil
+ }
+ } else {
+ if x.DeletionGracePeriodSeconds == nil {
+ x.DeletionGracePeriodSeconds = new(int64)
+ }
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv39 := &x.Labels
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv39, false, 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() {
+ x.Annotations = nil
+ } else {
+ yyv41 := &x.Annotations
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv41, false, 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() {
+ x.OwnerReferences = nil
+ } else {
+ yyv43 := &x.OwnerReferences
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ h.decSliceOwnerReference((*[]OwnerReference)(yyv43), 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() {
+ x.Finalizers = nil
+ } else {
+ yyv45 := &x.Finalizers
+ yym46 := z.DecBinary()
+ _ = yym46
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv45, false, 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 *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 [21]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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(21)
+ } 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)
+ }
+ }
+ }
+ }
+ 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 {
+ x.Name = string(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)
+ }
+ 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 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() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ if x.VolumeSource.HostPath == nil {
+ x.VolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.EmptyDir == nil {
+ x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.AWSElasticBlockStore == nil {
+ x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.GitRepo == nil {
+ x.VolumeSource.GitRepo = new(GitRepoVolumeSource)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.ISCSI == nil {
+ x.VolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.Glusterfs == nil {
+ x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.PersistentVolumeClaim == nil {
+ x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.FlexVolume == nil {
+ x.VolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.Cinder == nil {
+ x.VolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.CephFS == nil {
+ x.VolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.Flocker == nil {
+ x.VolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.DownwardAPI == nil {
+ x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.AzureFile == nil {
+ x.VolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.ConfigMap == nil {
+ x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ 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 *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 [20]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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(20)
+ } else {
+ 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_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)
+ }
+ 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 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() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.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() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.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() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.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() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.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() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.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() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.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() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.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() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.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() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.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() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.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() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.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() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.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() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.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() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.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() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.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() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.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() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.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() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.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() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.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() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ 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 *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 [14]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.FlexVolume != nil
+ yyq2[8] = x.Cinder != nil
+ yyq2[9] = x.CephFS != nil
+ yyq2[10] = x.FC != nil
+ yyq2[11] = x.Flocker != nil
+ yyq2[12] = x.AzureFile != nil
+ yyq2[13] = x.VsphereVolume != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ 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.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ 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[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 x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ 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 x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ 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 x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ 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 x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.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_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 "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 "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 "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)
+ }
+ 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 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.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.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() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.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() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.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() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.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() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.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() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.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() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.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() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.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() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.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() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.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() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.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() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.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() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.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() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ 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 *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 {
+ x.ClaimName = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.ClaimName = ""
+ } else {
+ x.ClaimName = string(r.DecodeString())
+ }
+ 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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PersistentVolumeSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PersistentVolumeStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [18]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = len(x.AccessModes) != 0
+ yyq2[2] = x.ClaimRef != nil
+ yyq2[3] = x.PersistentVolumeReclaimPolicy != ""
+ yyq2[4] = x.PersistentVolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil
+ yyq2[5] = x.PersistentVolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil
+ yyq2[6] = x.PersistentVolumeSource.HostPath != nil && x.HostPath != nil
+ yyq2[7] = x.PersistentVolumeSource.Glusterfs != nil && x.Glusterfs != nil
+ yyq2[8] = x.PersistentVolumeSource.NFS != nil && x.NFS != nil
+ yyq2[9] = x.PersistentVolumeSource.RBD != nil && x.RBD != nil
+ yyq2[10] = x.PersistentVolumeSource.ISCSI != nil && x.ISCSI != nil
+ yyq2[11] = x.PersistentVolumeSource.FlexVolume != nil && x.FlexVolume != nil
+ yyq2[12] = x.PersistentVolumeSource.Cinder != nil && x.Cinder != nil
+ yyq2[13] = x.PersistentVolumeSource.CephFS != nil && x.CephFS != nil
+ yyq2[14] = x.PersistentVolumeSource.FC != nil && x.FC != nil
+ yyq2[15] = x.PersistentVolumeSource.Flocker != nil && x.Flocker != nil
+ yyq2[16] = x.PersistentVolumeSource.AzureFile != nil && x.AzureFile != nil
+ yyq2[17] = x.PersistentVolumeSource.VsphereVolume != nil && x.VsphereVolume != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(18)
+ } 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_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.ClaimRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ClaimRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ 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[3] {
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeReclaimPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ }
+ }
+ var yyn15 bool
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ yyn15 = true
+ goto LABEL15
+ }
+ LABEL15:
+ if yyr2 || yy2arr2 {
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn18 bool
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ yyn18 = true
+ goto LABEL18
+ }
+ LABEL18:
+ if yyr2 || yy2arr2 {
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn21 bool
+ if x.PersistentVolumeSource.HostPath == nil {
+ yyn21 = true
+ goto LABEL21
+ }
+ LABEL21:
+ if yyr2 || yy2arr2 {
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn24 bool
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ yyn24 = true
+ goto LABEL24
+ }
+ LABEL24:
+ if yyr2 || yy2arr2 {
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn27 bool
+ if x.PersistentVolumeSource.NFS == nil {
+ yyn27 = true
+ goto LABEL27
+ }
+ LABEL27:
+ if yyr2 || yy2arr2 {
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn30 bool
+ if x.PersistentVolumeSource.RBD == nil {
+ yyn30 = true
+ goto LABEL30
+ }
+ LABEL30:
+ if yyr2 || yy2arr2 {
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn33 bool
+ if x.PersistentVolumeSource.ISCSI == nil {
+ yyn33 = true
+ goto LABEL33
+ }
+ LABEL33:
+ if yyr2 || yy2arr2 {
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn36 bool
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ yyn36 = true
+ goto LABEL36
+ }
+ LABEL36:
+ if yyr2 || yy2arr2 {
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ 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 yyn36 {
+ r.EncodeNil()
+ } else {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn39 bool
+ if x.PersistentVolumeSource.Cinder == nil {
+ yyn39 = true
+ goto LABEL39
+ }
+ LABEL39:
+ if yyr2 || yy2arr2 {
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ 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 yyn39 {
+ r.EncodeNil()
+ } else {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn42 bool
+ if x.PersistentVolumeSource.CephFS == nil {
+ yyn42 = true
+ goto LABEL42
+ }
+ LABEL42:
+ if yyr2 || yy2arr2 {
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ 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 yyn42 {
+ r.EncodeNil()
+ } else {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn45 bool
+ if x.PersistentVolumeSource.FC == nil {
+ yyn45 = true
+ goto LABEL45
+ }
+ LABEL45:
+ if yyr2 || yy2arr2 {
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn48 bool
+ if x.PersistentVolumeSource.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.PersistentVolumeSource.AzureFile == nil {
+ yyn51 = true
+ goto LABEL51
+ }
+ LABEL51:
+ if yyr2 || yy2arr2 {
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn54 bool
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ yyn54 = true
+ goto LABEL54
+ }
+ LABEL54:
+ if yyr2 || yy2arr2 {
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ 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 "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv5 := &x.AccessModes
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv5), 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 {
+ x.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(r.DecodeString())
+ }
+ 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 "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 "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 "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)
+ }
+ 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 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.Capacity = nil
+ } else {
+ yyv24 := &x.Capacity
+ yyv24.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.AccessModes = nil
+ } else {
+ yyv25 := &x.AccessModes
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv25), 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() {
+ if x.ClaimRef != nil {
+ x.ClaimRef = nil
+ }
+ } else {
+ if x.ClaimRef == nil {
+ x.ClaimRef = new(ObjectReference)
+ }
+ x.ClaimRef.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.PersistentVolumeReclaimPolicy = ""
+ } else {
+ x.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(r.DecodeString())
+ }
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ 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.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Cinder == nil {
+ x.PersistentVolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AzureFile == nil {
+ x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ 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.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)
+ }
+ 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.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.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 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 {
+ x.Phase = PersistentVolumePhase(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(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 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.Phase = ""
+ } else {
+ x.Phase = PersistentVolumePhase(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.Message = ""
+ } else {
+ x.Message = string(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.Reason = ""
+ } else {
+ x.Reason = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePersistentVolume((*[]PersistentVolume)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePersistentVolume((*[]PersistentVolume)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeClaimSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PersistentVolumeClaimSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]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 != ""
+ 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.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_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_unversioned.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 {
+ x.VolumeName = string(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 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.AccessModes = nil
+ } else {
+ yyv11 := &x.AccessModes
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.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() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv15 := &x.Resources
+ 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.VolumeName = ""
+ } else {
+ x.VolumeName = string(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 *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 {
+ x.Phase = PersistentVolumeClaimPhase(r.DecodeString())
+ }
+ 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 {
+ x.Phase = PersistentVolumeClaimPhase(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.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 {
+ x.Path = string(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 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.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ 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 *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 [1]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Medium != ""
+ 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.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_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 {
+ x.Medium = StorageMedium(r.DecodeString())
+ }
+ 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 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.Medium = ""
+ } else {
+ x.Medium = StorageMedium(r.DecodeString())
+ }
+ 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 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 {
+ x.PDName = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ x.Partition = int32(r.DecodeInt(32))
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.PDName = ""
+ } else {
+ x.PDName = string(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 {
+ x.FSType = string(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.Partition = 0
+ } else {
+ x.Partition = 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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 *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 [6]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.TargetPortal != ""
+ yyq2[1] = x.IQN != ""
+ yyq2[2] = x.Lun != 0
+ yyq2[3] = x.ISCSIInterface != ""
+ yyq2[4] = x.FSType != ""
+ yyq2[5] = x.ReadOnly != false
+ 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.TargetPortal))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ 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)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IQN))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Lun))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ 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_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 {
+ x.TargetPortal = string(r.DecodeString())
+ }
+ case "iqn":
+ if r.TryDecodeAsNil() {
+ x.IQN = ""
+ } else {
+ x.IQN = string(r.DecodeString())
+ }
+ case "lun":
+ if r.TryDecodeAsNil() {
+ x.Lun = 0
+ } else {
+ x.Lun = int32(r.DecodeInt(32))
+ }
+ case "iscsiInterface":
+ if r.TryDecodeAsNil() {
+ x.ISCSIInterface = ""
+ } else {
+ x.ISCSIInterface = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 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.TargetPortal = ""
+ } else {
+ x.TargetPortal = string(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.IQN = ""
+ } else {
+ x.IQN = string(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.Lun = 0
+ } else {
+ x.Lun = 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.ISCSIInterface = ""
+ } else {
+ x.ISCSIInterface = string(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 {
+ x.FSType = string(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 {
+ x.ReadOnly = bool(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 *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 {
+ x.FSType = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.TargetWWNs = nil
+ } else {
+ yyv11 := &x.TargetWWNs
+ 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() {
+ if x.Lun != nil {
+ x.Lun = nil
+ }
+ } else {
+ if x.Lun == nil {
+ x.Lun = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.Lun)) = 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.FSType = ""
+ } else {
+ x.FSType = string(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 {
+ x.ReadOnly = bool(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 *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 {
+ x.Driver = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(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 {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ case "options":
+ if r.TryDecodeAsNil() {
+ x.Options = nil
+ } else {
+ yyv8 := &x.Options
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv8, 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 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.Driver = ""
+ } else {
+ x.Driver = string(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 {
+ x.FSType = string(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.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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.Options = nil
+ } else {
+ yyv15 := &x.Options
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecMapStringStringX(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 *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 {
+ x.VolumeID = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ x.Partition = int32(r.DecodeInt(32))
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.VolumeID = ""
+ } else {
+ x.VolumeID = string(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 {
+ x.FSType = string(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.Partition = 0
+ } else {
+ x.Partition = 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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 *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 {
+ x.Repository = string(r.DecodeString())
+ }
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = ""
+ } else {
+ x.Revision = string(r.DecodeString())
+ }
+ case "directory":
+ if r.TryDecodeAsNil() {
+ x.Directory = ""
+ } else {
+ x.Directory = string(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 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.Repository = ""
+ } else {
+ x.Repository = string(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.Revision = ""
+ } else {
+ x.Revision = string(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.Directory = ""
+ } else {
+ x.Directory = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.SecretName != ""
+ yyq2[1] = len(x.Items) != 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.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_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 {
+ x.SecretName = string(r.DecodeString())
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv5 := &x.Items
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv5), d)
+ }
+ }
+ 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 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.SecretName = ""
+ } else {
+ x.SecretName = string(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.Items = nil
+ } else {
+ yyv9 := &x.Items
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(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 *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 {
+ x.Server = string(r.DecodeString())
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.Server = ""
+ } else {
+ x.Server = string(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.Path = ""
+ } else {
+ x.Path = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 {
+ x.EndpointsName = string(r.DecodeString())
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.EndpointsName = ""
+ } else {
+ x.EndpointsName = string(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.Path = ""
+ } else {
+ x.Path = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 {
+ x.RBDImage = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "pool":
+ if r.TryDecodeAsNil() {
+ x.RBDPool = ""
+ } else {
+ x.RBDPool = string(r.DecodeString())
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.RadosUser = ""
+ } else {
+ x.RadosUser = string(r.DecodeString())
+ }
+ case "keyring":
+ if r.TryDecodeAsNil() {
+ x.Keyring = ""
+ } else {
+ x.Keyring = string(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 {
+ x.ReadOnly = bool(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 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.CephMonitors = nil
+ } else {
+ yyv14 := &x.CephMonitors
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv14, 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.RBDImage = ""
+ } else {
+ x.RBDImage = string(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 {
+ x.FSType = string(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.RBDPool = ""
+ } else {
+ x.RBDPool = string(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.RadosUser = ""
+ } else {
+ x.RadosUser = string(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.Keyring = ""
+ } else {
+ x.Keyring = string(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 {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 {
+ x.VolumeID = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.VolumeID = ""
+ } else {
+ x.VolumeID = string(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.FSType = ""
+ } else {
+ x.FSType = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ x.User = string(r.DecodeString())
+ }
+ case "secretFile":
+ if r.TryDecodeAsNil() {
+ x.SecretFile = ""
+ } else {
+ x.SecretFile = string(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 {
+ x.ReadOnly = bool(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 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.Monitors = nil
+ } else {
+ yyv12 := &x.Monitors
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, 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() {
+ x.Path = ""
+ } else {
+ x.Path = string(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.User = ""
+ } else {
+ x.User = string(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.SecretFile = ""
+ } else {
+ x.SecretFile = string(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.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 [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.DatasetName))
+ }
+ } else {
+ 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_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 {
+ x.DatasetName = string(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 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.DatasetName = ""
+ } else {
+ x.DatasetName = string(r.DecodeString())
+ }
+ 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 *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 [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 *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)
+ }
+ }
+ 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 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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.FieldRef != nil
+ yyq2[2] = x.ResourceFieldRef != 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.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_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 {
+ x.Path = string(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)
+ }
+ 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 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 {
+ x.Path = string(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() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.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.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.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 *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 {
+ x.SecretName = string(r.DecodeString())
+ }
+ case "shareName":
+ if r.TryDecodeAsNil() {
+ x.ShareName = ""
+ } else {
+ x.ShareName = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.SecretName = ""
+ } else {
+ x.SecretName = string(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.ShareName = ""
+ } else {
+ x.ShareName = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 [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.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_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 {
+ x.VolumePath = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(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 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.VolumePath = ""
+ } else {
+ x.VolumePath = string(r.DecodeString())
+ }
+ 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.FSType = ""
+ } else {
+ x.FSType = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Items) != 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 yyq2[0] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(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.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ 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 *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 "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv4), d)
+ }
+ }
+ case "Name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 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.Items = nil
+ } else {
+ yyv8 := &x.Items
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv8), 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.Name = ""
+ } else {
+ x.Name = string(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 *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 [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.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_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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ 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 {
+ x.Path = string(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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "hostPort":
+ if r.TryDecodeAsNil() {
+ x.HostPort = 0
+ } else {
+ x.HostPort = int32(r.DecodeInt(32))
+ }
+ case "containerPort":
+ if r.TryDecodeAsNil() {
+ x.ContainerPort = 0
+ } else {
+ x.ContainerPort = int32(r.DecodeInt(32))
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ x.Protocol = Protocol(r.DecodeString())
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ x.HostIP = string(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 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 {
+ x.Name = string(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.HostPort = 0
+ } else {
+ x.HostPort = 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.ContainerPort = 0
+ } else {
+ x.ContainerPort = 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 {
+ x.Protocol = Protocol(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.HostIP = ""
+ } else {
+ x.HostIP = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ case "mountPath":
+ if r.TryDecodeAsNil() {
+ x.MountPath = ""
+ } else {
+ x.MountPath = string(r.DecodeString())
+ }
+ case "subPath":
+ if r.TryDecodeAsNil() {
+ x.SubPath = ""
+ } else {
+ x.SubPath = string(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 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 {
+ x.Name = string(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 {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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.MountPath = ""
+ } else {
+ x.MountPath = string(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.SubPath = ""
+ } else {
+ x.SubPath = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(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 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 {
+ x.Name = string(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.Value = ""
+ } else {
+ x.Value = string(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() {
+ if x.ValueFrom != nil {
+ x.ValueFrom = nil
+ }
+ } else {
+ if x.ValueFrom == nil {
+ x.ValueFrom = new(EnvVarSource)
+ }
+ x.ValueFrom.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 *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
+ 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.APIVersion))
+ }
+ } else {
+ 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 {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 *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 {
+ x.ContainerName = string(r.DecodeString())
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ x.Resource = string(r.DecodeString())
+ }
+ case "divisor":
+ if r.TryDecodeAsNil() {
+ x.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.Divisor
+ 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 *ResourceFieldSelector) 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.ContainerName = ""
+ } else {
+ x.ContainerName = string(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.Resource = ""
+ } else {
+ x.Resource = string(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.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.Divisor
+ 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 *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 [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.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.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 *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 "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ case "Name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ 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 {
+ x.Name = string(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 *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 [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.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.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 *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 "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ case "Name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ 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 {
+ x.Name = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(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 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 {
+ x.Name = string(r.DecodeString())
+ }
+ 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.Value = ""
+ } else {
+ x.Value = string(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 *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[1] = true
+ 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 = 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] {
+ 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 {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ 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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv5 := &x.Port
+ 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)
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ x.Host = string(r.DecodeString())
+ }
+ case "scheme":
+ if r.TryDecodeAsNil() {
+ x.Scheme = ""
+ } else {
+ x.Scheme = URIScheme(r.DecodeString())
+ }
+ case "httpHeaders":
+ if r.TryDecodeAsNil() {
+ x.HTTPHeaders = nil
+ } else {
+ yyv9 := &x.HTTPHeaders
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(yyv9), 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 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.Path = ""
+ } else {
+ x.Path = string(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.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv13 := &x.Port
+ 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)
+ }
+ }
+ 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.Host = ""
+ } else {
+ x.Host = string(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.Scheme = ""
+ } else {
+ x.Scheme = URIScheme(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.HTTPHeaders = nil
+ } else {
+ yyv17 := &x.HTTPHeaders
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(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 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 [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.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 {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ 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_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)
+ }
+ }
+ 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 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 = pkg4_intstr.IntOrString{}
+ } else {
+ yyv7 := &x.Port
+ 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)
+ }
+ }
+ 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 *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.InitialDelaySeconds != 0
+ yyq2[1] = x.TimeoutSeconds != 0
+ yyq2[2] = x.PeriodSeconds != 0
+ yyq2[3] = x.SuccessThreshold != 0
+ yyq2[4] = x.FailureThreshold != 0
+ yyq2[5] = x.Handler.Exec != nil && x.Exec != nil
+ yyq2[6] = x.Handler.HTTPGet != nil && x.HTTPGet != nil
+ yyq2[7] = x.Handler.TCPSocket != nil && x.TCPSocket != 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.InitialDelaySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initialDelaySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.InitialDelaySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("periodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("successThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failureThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ }
+ }
+ var yyn18 bool
+ if x.Handler.Exec == nil {
+ yyn18 = true
+ goto LABEL18
+ }
+ LABEL18:
+ if yyr2 || yy2arr2 {
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn21 bool
+ if x.Handler.HTTPGet == nil {
+ yyn21 = true
+ goto LABEL21
+ }
+ LABEL21:
+ if yyr2 || yy2arr2 {
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpGet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn24 bool
+ if x.Handler.TCPSocket == nil {
+ yyn24 = true
+ goto LABEL24
+ }
+ LABEL24:
+ if yyr2 || yy2arr2 {
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tcpSocket"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ 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 *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 "initialDelaySeconds":
+ if r.TryDecodeAsNil() {
+ x.InitialDelaySeconds = 0
+ } else {
+ x.InitialDelaySeconds = int32(r.DecodeInt(32))
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ x.TimeoutSeconds = 0
+ } else {
+ x.TimeoutSeconds = int32(r.DecodeInt(32))
+ }
+ case "periodSeconds":
+ if r.TryDecodeAsNil() {
+ x.PeriodSeconds = 0
+ } else {
+ x.PeriodSeconds = int32(r.DecodeInt(32))
+ }
+ case "successThreshold":
+ if r.TryDecodeAsNil() {
+ x.SuccessThreshold = 0
+ } else {
+ x.SuccessThreshold = int32(r.DecodeInt(32))
+ }
+ case "failureThreshold":
+ if r.TryDecodeAsNil() {
+ x.FailureThreshold = 0
+ } else {
+ x.FailureThreshold = int32(r.DecodeInt(32))
+ }
+ 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)
+ }
+ 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 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.InitialDelaySeconds = 0
+ } else {
+ x.InitialDelaySeconds = 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.TimeoutSeconds = 0
+ } else {
+ x.TimeoutSeconds = 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.PeriodSeconds = 0
+ } else {
+ x.PeriodSeconds = 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.SuccessThreshold = 0
+ } else {
+ x.SuccessThreshold = 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.FailureThreshold = 0
+ } else {
+ x.FailureThreshold = int32(r.DecodeInt(32))
+ }
+ if x.Handler.Exec == nil {
+ x.Handler.Exec = new(ExecAction)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.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 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 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 [18]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.Env) != 0
+ yyq2[7] = true
+ yyq2[8] = len(x.VolumeMounts) != 0
+ yyq2[9] = x.LivenessProbe != nil
+ yyq2[10] = x.ReadinessProbe != nil
+ yyq2[11] = x.Lifecycle != nil
+ yyq2[12] = x.TerminationMessagePath != ""
+ yyq2[14] = x.SecurityContext != nil
+ yyq2[15] = x.Stdin != false
+ yyq2[16] = x.StdinOnce != false
+ yyq2[17] = x.TTY != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(18)
+ } 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.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.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("env"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yy25 := &x.Resources
+ yy25.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy27 := &x.Resources
+ yy27.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeMounts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.LivenessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.LivenessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ 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[10] {
+ if x.ReadinessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.ReadinessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ 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[11] {
+ if x.Lifecycle == nil {
+ r.EncodeNil()
+ } else {
+ x.Lifecycle.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ 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[12] {
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.ImagePullPolicy.CodecEncodeSelf(e)
+ } else {
+ 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[14] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ 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[15] {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ yym54 := z.EncBinary()
+ _ = yym54
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdinOnce"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym55 := z.EncBinary()
+ _ = yym55
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym57 := z.EncBinary()
+ _ = yym57
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym58 := z.EncBinary()
+ _ = yym58
+ 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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv6 := &x.Command
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "args":
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv8 := &x.Args
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "workingDir":
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ x.WorkingDir = string(r.DecodeString())
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv11 := &x.Ports
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv11), d)
+ }
+ }
+ case "env":
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv13 := &x.Env
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv13), d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv15 := &x.Resources
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "volumeMounts":
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv16 := &x.VolumeMounts
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv16), 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 {
+ x.TerminationMessagePath = string(r.DecodeString())
+ }
+ case "imagePullPolicy":
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ x.ImagePullPolicy = PullPolicy(r.DecodeString())
+ }
+ 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 {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ case "stdinOnce":
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ x.StdinOnce = bool(r.DecodeBool())
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(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 yyj27 int
+ var yyb27 bool
+ var yyhl27 bool = l >= 0
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv30 := &x.Command
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv30, false, d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv32 := &x.Args
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv32, false, d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ x.WorkingDir = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv35 := &x.Ports
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv35), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv37 := &x.Env
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv37), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv39 := &x.Resources
+ yyv39.CodecDecodeSelf(d)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv40 := &x.VolumeMounts
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv40), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePath = ""
+ } else {
+ x.TerminationMessagePath = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ x.ImagePullPolicy = PullPolicy(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ x.StdinOnce = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ for {
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj27-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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ 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.Message = ""
+ } else {
+ x.Message = string(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 *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_unversioned.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_unversioned.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 {
+ x.ExitCode = int32(r.DecodeInt(32))
+ }
+ case "signal":
+ if r.TryDecodeAsNil() {
+ x.Signal = 0
+ } else {
+ x.Signal = int32(r.DecodeInt(32))
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "startedAt":
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv8 := &x.StartedAt
+ 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 "finishedAt":
+ if r.TryDecodeAsNil() {
+ x.FinishedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv10 := &x.FinishedAt
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv10) {
+ } else if yym11 {
+ z.DecBinaryUnmarshal(yyv10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv10)
+ } else {
+ z.DecFallback(yyv10, false)
+ }
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 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.ExitCode = 0
+ } else {
+ x.ExitCode = 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.Signal = 0
+ } else {
+ x.Signal = 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.Reason = ""
+ } else {
+ x.Reason = string(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.Message = ""
+ } else {
+ x.Message = string(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.StartedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv18 := &x.StartedAt
+ 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)
+ }
+ }
+ 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.FinishedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv20 := &x.FinishedAt
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv20) {
+ } else if yym21 {
+ z.DecBinaryUnmarshal(yyv20)
+ } else if !yym21 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv20)
+ } else {
+ z.DecFallback(yyv20, 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.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "state":
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv5 := &x.State
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastState":
+ if r.TryDecodeAsNil() {
+ x.LastTerminationState = ContainerState{}
+ } else {
+ yyv6 := &x.LastTerminationState
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "ready":
+ if r.TryDecodeAsNil() {
+ x.Ready = false
+ } else {
+ x.Ready = bool(r.DecodeBool())
+ }
+ case "restartCount":
+ if r.TryDecodeAsNil() {
+ x.RestartCount = 0
+ } else {
+ x.RestartCount = int32(r.DecodeInt(32))
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ case "imageID":
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ x.ImageID = string(r.DecodeString())
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 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 {
+ x.Name = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv14 := &x.State
+ 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.LastTerminationState = ContainerState{}
+ } else {
+ yyv15 := &x.LastTerminationState
+ 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.Ready = false
+ } else {
+ x.Ready = bool(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.RestartCount = 0
+ } else {
+ x.RestartCount = 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.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ x.ImageID = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 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 {
+ x.Type = PodConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = PodConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastProbeTime
+ 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.LastTransitionTime = pkg2_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePod(([]Pod)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePod((*[]Pod)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePod((*[]Pod)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = NodeSelectorOperator(r.DecodeString())
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv6 := &x.Values
+ 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 *NodeSelectorRequirement) 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = NodeSelectorOperator(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.Values = nil
+ } else {
+ yyv11 := &x.Values
+ 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 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 {
+ x.Weight = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ case "podAffinityTerm":
+ if r.TryDecodeAsNil() {
+ x.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv5 := &x.PodAffinityTerm
+ yyv5.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 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.Weight = 0
+ } else {
+ x.Weight = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv8 := &x.PodAffinityTerm
+ 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 *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[2] = x.TopologyKey != ""
+ 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] {
+ 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 x.Namespaces == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Namespaces, false, e)
+ }
+ }
+ } else {
+ 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_unversioned.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 {
+ x.TopologyKey = string(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 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.LabelSelector != nil {
+ x.LabelSelector = nil
+ }
+ } else {
+ if x.LabelSelector == nil {
+ x.LabelSelector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LabelSelector) {
+ } else {
+ z.DecFallback(x.LabelSelector, false)
+ }
+ }
+ 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.Namespaces = nil
+ } else {
+ yyv12 := &x.Namespaces
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, 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.TopologyKey = ""
+ } else {
+ x.TopologyKey = string(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 *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 {
+ x.Weight = int32(r.DecodeInt(32))
+ }
+ case "preference":
+ if r.TryDecodeAsNil() {
+ x.Preference = NodeSelectorTerm{}
+ } else {
+ yyv5 := &x.Preference
+ yyv5.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 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.Weight = 0
+ } else {
+ x.Weight = int32(r.DecodeInt(32))
+ }
+ 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.Preference = NodeSelectorTerm{}
+ } else {
+ yyv8 := &x.Preference
+ 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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Value != ""
+ 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)
+ 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_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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(r.DecodeString())
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ x.Effect = TaintEffect(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(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.Value = ""
+ } else {
+ x.Value = string(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.Effect = ""
+ } else {
+ x.Effect = TaintEffect(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 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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Key != ""
+ yyq2[1] = x.Operator != ""
+ yyq2[2] = x.Value != ""
+ yyq2[3] = x.Effect != ""
+ 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.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_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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = TolerationOperator(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(r.DecodeString())
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ x.Effect = TaintEffect(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = TolerationOperator(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 {
+ x.Value = string(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.Effect = ""
+ } else {
+ x.Effect = TaintEffect(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 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 [13]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = x.RestartPolicy != ""
+ yyq2[3] = x.TerminationGracePeriodSeconds != nil
+ yyq2[4] = x.ActiveDeadlineSeconds != nil
+ yyq2[5] = x.DNSPolicy != ""
+ yyq2[6] = len(x.NodeSelector) != 0
+ yyq2[8] = x.NodeName != ""
+ yyq2[9] = x.SecurityContext != nil
+ yyq2[10] = len(x.ImagePullSecrets) != 0
+ yyq2[11] = x.Hostname != ""
+ yyq2[12] = x.Subdomain != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(13)
+ } else {
+ yynn2 = 3
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceVolume(([]Volume)(x.Volumes), e)
+ }
+ }
+ } else {
+ 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 x.Containers == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ 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 {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.Containers), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.RestartPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ 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[3] {
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy13 := *x.TerminationGracePeriodSeconds
+ 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("terminationGracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.TerminationGracePeriodSeconds
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.ActiveDeadlineSeconds
+ 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("activeDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.ActiveDeadlineSeconds
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.DNSPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ 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[6] {
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ 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[10] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subdomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ }
+ }
+ 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 "containers":
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv6 := &x.Containers
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv6), d)
+ }
+ }
+ case "restartPolicy":
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ x.RestartPolicy = RestartPolicy(r.DecodeString())
+ }
+ case "terminationGracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ 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)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "dnsPolicy":
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ x.DNSPolicy = DNSPolicy(r.DecodeString())
+ }
+ case "nodeSelector":
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv14 := &x.NodeSelector
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv14, false, d)
+ }
+ }
+ case "serviceAccountName":
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ x.ServiceAccountName = string(r.DecodeString())
+ }
+ case "nodeName":
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ x.NodeName = string(r.DecodeString())
+ }
+ 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 {
+ yyv19 := &x.ImagePullSecrets
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv19), d)
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(r.DecodeString())
+ }
+ case "subdomain":
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ x.Subdomain = string(r.DecodeString())
+ }
+ 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 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.Volumes = nil
+ } else {
+ yyv24 := &x.Volumes
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.decSliceVolume((*[]Volume)(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.Containers = nil
+ } else {
+ yyv26 := &x.Containers
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv26), 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.RestartPolicy = ""
+ } else {
+ x.RestartPolicy = RestartPolicy(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.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.DNSPolicy = ""
+ } else {
+ x.DNSPolicy = DNSPolicy(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.NodeSelector = nil
+ } else {
+ yyv34 := &x.NodeSelector
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv34, 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.ServiceAccountName = ""
+ } else {
+ x.ServiceAccountName = string(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.NodeName = ""
+ } else {
+ x.NodeName = string(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.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(PodSecurityContext)
+ }
+ x.SecurityContext.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.ImagePullSecrets = nil
+ } else {
+ yyv39 := &x.ImagePullSecrets
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv39), 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.Hostname = ""
+ } else {
+ x.Hostname = string(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.Subdomain = ""
+ } else {
+ x.Subdomain = string(r.DecodeString())
+ }
+ 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 *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 [8]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.HostNetwork != false
+ yyq2[1] = x.HostPID != false
+ yyq2[2] = x.HostIPC != false
+ yyq2[3] = x.SELinuxOptions != nil
+ yyq2[4] = x.RunAsUser != nil
+ yyq2[5] = x.RunAsNonRoot != nil
+ yyq2[6] = len(x.SupplementalGroups) != 0
+ yyq2[7] = x.FSGroup != 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.EncodeBool(bool(x.HostNetwork))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetwork"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ 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[4] {
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.RunAsUser
+ 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("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.RunAsUser
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.RunAsNonRoot
+ 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("runAsNonRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.RunAsNonRoot
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeBool(bool(yy23))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.SupplementalGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncSliceInt64V(x.SupplementalGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SupplementalGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.EncSliceInt64V(x.SupplementalGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.FSGroup == nil {
+ r.EncodeNil()
+ } else {
+ yy29 := *x.FSGroup
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeInt(int64(yy29))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FSGroup == nil {
+ r.EncodeNil()
+ } else {
+ yy31 := *x.FSGroup
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(yy31))
+ }
+ }
+ }
+ }
+ 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 "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(r.DecodeBool())
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ x.HostPID = bool(r.DecodeBool())
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ x.HostIPC = bool(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 "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = nil
+ } else {
+ yyv12 := &x.SupplementalGroups
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceInt64X(yyv12, false, d)
+ }
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ if x.FSGroup != nil {
+ x.FSGroup = nil
+ }
+ } else {
+ if x.FSGroup == nil {
+ x.FSGroup = new(int64)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ 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 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.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(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.HostPID = false
+ } else {
+ x.HostPID = bool(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.HostIPC = false
+ } else {
+ x.HostIPC = bool(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() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.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.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = 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.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = 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.SupplementalGroups = nil
+ } else {
+ yyv25 := &x.SupplementalGroups
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.DecSliceInt64X(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() {
+ if x.FSGroup != nil {
+ x.FSGroup = nil
+ }
+ } else {
+ if x.FSGroup == nil {
+ x.FSGroup = new(int64)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 *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 [8]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.ContainerStatuses) != 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
+ }
+ 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.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerStatuses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), 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 {
+ x.Phase = PodPhase(r.DecodeString())
+ }
+ 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 {
+ x.Message = string(r.DecodeString())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ x.HostIP = string(r.DecodeString())
+ }
+ case "podIP":
+ if r.TryDecodeAsNil() {
+ x.PodIP = ""
+ } else {
+ x.PodIP = string(r.DecodeString())
+ }
+ case "startTime":
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_unversioned.Time)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ case "containerStatuses":
+ if r.TryDecodeAsNil() {
+ x.ContainerStatuses = nil
+ } else {
+ yyv13 := &x.ContainerStatuses
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv13), 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 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.Phase = ""
+ } else {
+ x.Phase = PodPhase(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.Conditions = nil
+ } else {
+ yyv17 := &x.Conditions
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSlicePodCondition((*[]PodCondition)(yyv17), 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.Message = ""
+ } else {
+ x.Message = string(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.Reason = ""
+ } else {
+ x.Reason = string(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.HostIP = ""
+ } else {
+ x.HostIP = string(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.PodIP = ""
+ } else {
+ x.PodIP = string(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.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_unversioned.Time)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym24 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, 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.ContainerStatuses = nil
+ } else {
+ yyv25 := &x.ContainerStatuses
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv25), 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Status = PodStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PodSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PodStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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 = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv7 := &x.ObjectMeta
+ 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.Spec = PodSpec{}
+ } else {
+ yyv8 := &x.Spec
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Template
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Template
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = PodTemplateSpec{}
+ } else {
+ yyv5 := &x.Template
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Template = PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodTemplate(([]PodTemplate)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodTemplate((*[]PodTemplate)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodTemplate((*[]PodTemplate)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = x.Template != 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.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 x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ 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] {
+ if x.Template == nil {
+ r.EncodeNil()
+ } else {
+ x.Template.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ 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() {
+ x.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv5 := &x.Selector
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv5, 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 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 {
+ x.Replicas = 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 = nil
+ } else {
+ yyv10 := &x.Selector
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, 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() {
+ if x.Template != nil {
+ x.Template = nil
+ }
+ } else {
+ if x.Template == nil {
+ x.Template = new(PodTemplateSpec)
+ }
+ x.Template.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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ObservedGeneration != 0
+ 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] {
+ 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.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = int32(r.DecodeInt(32))
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 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.Replicas = 0
+ } else {
+ x.Replicas = 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.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = 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.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicationControllerSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicationControllerStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ReplicationControllerSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ReplicationControllerStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceReplicationController(([]ReplicationController)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceReplicationController((*[]ReplicationController)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceReplicationController((*[]ReplicationController)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceService(([]Service)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceService((*[]Service)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceService((*[]Service)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 *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 {
+ x.IP = string(r.DecodeString())
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(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 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.IP = ""
+ } else {
+ x.IP = string(r.DecodeString())
+ }
+ 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.Hostname = ""
+ } else {
+ x.Hostname = string(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 *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 [8]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Type != ""
+ yyq2[3] = x.ClusterIP != ""
+ yyq2[4] = len(x.ExternalIPs) != 0
+ yyq2[5] = x.LoadBalancerIP != ""
+ yyq2[6] = x.SessionAffinity != ""
+ yyq2[7] = len(x.LoadBalancerSourceRanges) != 0
+ 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] {
+ 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 x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP))
+ }
+ }
+ }
+ 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] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ x.SessionAffinity.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ 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[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_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 "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = ServiceType(r.DecodeString())
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv5 := &x.Ports
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv5), d)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv7 := &x.Selector
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv7, false, d)
+ }
+ }
+ case "clusterIP":
+ if r.TryDecodeAsNil() {
+ x.ClusterIP = ""
+ } else {
+ x.ClusterIP = string(r.DecodeString())
+ }
+ case "externalIPs":
+ if r.TryDecodeAsNil() {
+ x.ExternalIPs = nil
+ } else {
+ yyv10 := &x.ExternalIPs
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "loadBalancerIP":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerIP = ""
+ } else {
+ x.LoadBalancerIP = string(r.DecodeString())
+ }
+ case "sessionAffinity":
+ if r.TryDecodeAsNil() {
+ x.SessionAffinity = ""
+ } else {
+ x.SessionAffinity = ServiceAffinity(r.DecodeString())
+ }
+ case "loadBalancerSourceRanges":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerSourceRanges = nil
+ } else {
+ yyv14 := &x.LoadBalancerSourceRanges
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv14, false, d)
+ }
+ }
+ 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 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.Type = ""
+ } else {
+ x.Type = ServiceType(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.Ports = nil
+ } else {
+ yyv18 := &x.Ports
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv18), 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.Selector = nil
+ } else {
+ yyv20 := &x.Selector
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv20, 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.ClusterIP = ""
+ } else {
+ x.ClusterIP = string(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.ExternalIPs = nil
+ } else {
+ yyv23 := &x.ExternalIPs
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, 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.LoadBalancerIP = ""
+ } else {
+ x.LoadBalancerIP = string(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.SessionAffinity = ""
+ } else {
+ x.SessionAffinity = ServiceAffinity(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.LoadBalancerSourceRanges = nil
+ } else {
+ yyv27 := &x.LoadBalancerSourceRanges
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv27, false, 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 *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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } 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)
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ 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)
+ 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 {
+ 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)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodePort))
+ }
+ } else {
+ 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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ x.Protocol = Protocol(r.DecodeString())
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ case "targetPort":
+ if r.TryDecodeAsNil() {
+ x.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv7 := &x.TargetPort
+ 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)
+ }
+ }
+ case "nodePort":
+ if r.TryDecodeAsNil() {
+ x.NodePort = 0
+ } else {
+ x.NodePort = 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 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 {
+ x.Name = string(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.Protocol = ""
+ } else {
+ x.Protocol = Protocol(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.Port = 0
+ } else {
+ x.Port = 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.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv14 := &x.TargetPort
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv14)
+ } else {
+ z.DecFallback(yyv14, 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.NodePort = 0
+ } else {
+ x.NodePort = 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ServiceSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ServiceStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ServiceSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ServiceStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[2] = len(x.ImagePullSecrets) != 0
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "secrets":
+ if r.TryDecodeAsNil() {
+ x.Secrets = nil
+ } else {
+ yyv5 := &x.Secrets
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv5), d)
+ }
+ }
+ case "imagePullSecrets":
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv7 := &x.ImagePullSecrets
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv7), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv12 := &x.ObjectMeta
+ 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.Secrets = nil
+ } else {
+ yyv13 := &x.Secrets
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv13), 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.ImagePullSecrets = nil
+ } else {
+ yyv15 := &x.ImagePullSecrets
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv15), 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceServiceAccount((*[]ServiceAccount)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceServiceAccount((*[]ServiceAccount)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Subsets == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "Subsets":
+ if r.TryDecodeAsNil() {
+ x.Subsets = nil
+ } else {
+ yyv5 := &x.Subsets
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(yyv5), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Subsets = nil
+ } else {
+ yyv11 := &x.Subsets
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ 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)
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e)
+ }
+ }
+ } else {
+ 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 x.NotReadyAddresses == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e)
+ }
+ }
+ } else {
+ 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 x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e)
+ }
+ }
+ } else {
+ 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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Hostname != ""
+ 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.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 x.TargetRef == nil {
+ r.EncodeNil()
+ } else {
+ x.TargetRef.CodecEncodeSelf(e)
+ }
+ } else {
+ 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 {
+ x.IP = string(r.DecodeString())
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(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 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.IP = ""
+ } else {
+ x.IP = string(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.Hostname = ""
+ } else {
+ x.Hostname = string(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() {
+ if x.TargetRef != nil {
+ x.TargetRef = nil
+ }
+ } else {
+ if x.TargetRef == nil {
+ x.TargetRef = new(ObjectReference)
+ }
+ x.TargetRef.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 *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
+ 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.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.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)
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ 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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "Port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ case "Protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ x.Protocol = Protocol(r.DecodeString())
+ }
+ 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 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 {
+ x.Name = string(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.Port = 0
+ } else {
+ x.Port = 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.Protocol = ""
+ } else {
+ x.Protocol = Protocol(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpoints(([]Endpoints)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceEndpoints((*[]Endpoints)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEndpoints((*[]Endpoints)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]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
+ 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.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_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 {
+ x.PodCIDR = string(r.DecodeString())
+ }
+ case "externalID":
+ if r.TryDecodeAsNil() {
+ x.ExternalID = ""
+ } else {
+ x.ExternalID = string(r.DecodeString())
+ }
+ case "providerID":
+ if r.TryDecodeAsNil() {
+ x.ProviderID = ""
+ } else {
+ x.ProviderID = string(r.DecodeString())
+ }
+ case "unschedulable":
+ if r.TryDecodeAsNil() {
+ x.Unschedulable = false
+ } else {
+ x.Unschedulable = bool(r.DecodeBool())
+ }
+ 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 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.PodCIDR = ""
+ } else {
+ x.PodCIDR = string(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.ExternalID = ""
+ } else {
+ x.ExternalID = string(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.ProviderID = ""
+ } else {
+ x.ProviderID = string(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.Unschedulable = false
+ } else {
+ x.Unschedulable = bool(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 *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 {
+ x.Port = 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 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.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ 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 *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 {
+ x.MachineID = string(r.DecodeString())
+ }
+ case "systemUUID":
+ if r.TryDecodeAsNil() {
+ x.SystemUUID = ""
+ } else {
+ x.SystemUUID = string(r.DecodeString())
+ }
+ case "bootID":
+ if r.TryDecodeAsNil() {
+ x.BootID = ""
+ } else {
+ x.BootID = string(r.DecodeString())
+ }
+ case "kernelVersion":
+ if r.TryDecodeAsNil() {
+ x.KernelVersion = ""
+ } else {
+ x.KernelVersion = string(r.DecodeString())
+ }
+ case "osImage":
+ if r.TryDecodeAsNil() {
+ x.OSImage = ""
+ } else {
+ x.OSImage = string(r.DecodeString())
+ }
+ case "containerRuntimeVersion":
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntimeVersion = ""
+ } else {
+ x.ContainerRuntimeVersion = string(r.DecodeString())
+ }
+ case "kubeletVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeletVersion = ""
+ } else {
+ x.KubeletVersion = string(r.DecodeString())
+ }
+ case "kubeProxyVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeProxyVersion = ""
+ } else {
+ x.KubeProxyVersion = string(r.DecodeString())
+ }
+ case "operatingSystem":
+ if r.TryDecodeAsNil() {
+ x.OperatingSystem = ""
+ } else {
+ x.OperatingSystem = string(r.DecodeString())
+ }
+ case "architecture":
+ if r.TryDecodeAsNil() {
+ x.Architecture = ""
+ } else {
+ x.Architecture = string(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 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.MachineID = ""
+ } else {
+ x.MachineID = string(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.SystemUUID = ""
+ } else {
+ x.SystemUUID = string(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.BootID = ""
+ } else {
+ x.BootID = string(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.KernelVersion = ""
+ } else {
+ x.KernelVersion = string(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.OSImage = ""
+ } else {
+ x.OSImage = string(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.ContainerRuntimeVersion = ""
+ } else {
+ x.ContainerRuntimeVersion = string(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.KubeletVersion = ""
+ } else {
+ x.KubeletVersion = string(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.KubeProxyVersion = ""
+ } else {
+ x.KubeProxyVersion = string(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.OperatingSystem = ""
+ } else {
+ x.OperatingSystem = string(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.Architecture = ""
+ } else {
+ x.Architecture = string(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 *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 {
+ x.Phase = NodePhase(r.DecodeString())
+ }
+ 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 {
+ x.Phase = NodePhase(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.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 {
+ x.Name = UniqueVolumeName(r.DecodeString())
+ }
+ case "devicePath":
+ if r.TryDecodeAsNil() {
+ x.DevicePath = ""
+ } else {
+ x.DevicePath = string(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 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 {
+ x.Name = UniqueVolumeName(r.DecodeString())
+ }
+ 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.DevicePath = ""
+ } else {
+ x.DevicePath = string(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 *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 {
+ x.SizeBytes = 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 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.Names = nil
+ } else {
+ yyv8 := &x.Names
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, 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.SizeBytes = 0
+ } else {
+ x.SizeBytes = int64(r.DecodeInt(64))
+ }
+ 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 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 {
+ x.Type = NodeConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ case "lastHeartbeatTime":
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = NodeConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastHeartbeatTime
+ 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.LastTransitionTime = pkg2_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 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 {
+ x.Type = NodeAddressType(r.DecodeString())
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(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 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 {
+ x.Type = NodeAddressType(r.DecodeString())
+ }
+ 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.Address = ""
+ } else {
+ x.Address = string(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 *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
+ yyq2[0] = len(x.Capacity) != 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.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_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 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = NodeSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NodeStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = NodeSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = NodeStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNode(([]Node)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNode((*[]Node)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceNode((*[]Node)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ 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.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e)
+ }
+ }
+ } else {
+ 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 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 *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 {
+ x.Phase = NamespacePhase(r.DecodeString())
+ }
+ 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 {
+ x.Phase = NamespacePhase(r.DecodeString())
+ }
+ 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = NamespaceSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NamespaceStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = NamespaceSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = NamespaceStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNamespace(([]Namespace)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNamespace((*[]Namespace)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceNamespace((*[]Namespace)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.Target
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Target
+ yy11.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = ObjectReference{}
+ } else {
+ yyv5 := &x.Target
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Target = ObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 *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 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.GracePeriodSeconds != nil
+ yyq2[1] = x.Preconditions != nil
+ yyq2[2] = x.OrphanDependents != nil
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.GracePeriodSeconds
+ 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("gracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.GracePeriodSeconds
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Preconditions == nil {
+ r.EncodeNil()
+ } else {
+ x.Preconditions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ 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[2] {
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.OrphanDependents
+ 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("orphanDependents"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy14 := *x.OrphanDependents
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeBool(bool(yy14))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ 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)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "gracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ 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)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.Preconditions != nil {
+ x.Preconditions = nil
+ }
+ } else {
+ if x.Preconditions == nil {
+ x.Preconditions = new(Preconditions)
+ }
+ x.Preconditions.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.OrphanDependents != nil {
+ x.OrphanDependents = nil
+ }
+ } else {
+ if x.OrphanDependents == nil {
+ x.OrphanDependents = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.EncodeBool(bool(x.Export))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("export"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Export))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Exact))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exact"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Exact))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "export":
+ if r.TryDecodeAsNil() {
+ x.Export = false
+ } else {
+ x.Export = bool(r.DecodeBool())
+ }
+ case "exact":
+ if r.TryDecodeAsNil() {
+ x.Exact = false
+ } else {
+ x.Exact = bool(r.DecodeBool())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExportOptions) 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.Export = false
+ } else {
+ x.Export = bool(r.DecodeBool())
+ }
+ 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.Exact = false
+ } else {
+ x.Exact = bool(r.DecodeBool())
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[5] = x.Kind != ""
+ yyq2[6] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 5
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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 {
+ 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 x.FieldSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.FieldSelector) {
+ } else {
+ z.EncFallback(x.FieldSelector)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("FieldSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FieldSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.FieldSelector) {
+ } else {
+ z.EncFallback(x.FieldSelector)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Watch"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ResourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TimeoutSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("TimeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TimeoutSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "LabelSelector":
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = nil
+ } else {
+ yyv4 := &x.LabelSelector
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, true)
+ }
+ }
+ case "FieldSelector":
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = nil
+ } else {
+ yyv6 := &x.FieldSelector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else {
+ z.DecFallback(yyv6, true)
+ }
+ }
+ case "Watch":
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ x.Watch = bool(r.DecodeBool())
+ }
+ case "ResourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "TimeoutSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.LabelSelector = nil
+ } else {
+ yyv15 := &x.LabelSelector
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else {
+ z.DecFallback(yyv15, true)
+ }
+ }
+ 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.FieldSelector = nil
+ } else {
+ yyv17 := &x.FieldSelector
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else {
+ z.DecFallback(yyv17, true)
+ }
+ }
+ 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.Watch = false
+ } else {
+ x.Watch = bool(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.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(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.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = 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() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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[8] = x.Kind != ""
+ yyq2[9] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 8
+ 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.Container))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Follow"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Previous"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy13 := *x.SinceSeconds
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(yy13))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("SinceSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.SinceSeconds
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym18 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("SinceTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym19 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Timestamps"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy24 := *x.TailLines
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(yy24))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("TailLines"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy26 := *x.TailLines
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeInt(int64(yy26))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy29 := *x.LimitBytes
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeInt(int64(yy29))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("LimitBytes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy31 := *x.LimitBytes
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(yy31))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "Container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ x.Container = string(r.DecodeString())
+ }
+ case "Follow":
+ if r.TryDecodeAsNil() {
+ x.Follow = false
+ } else {
+ x.Follow = bool(r.DecodeBool())
+ }
+ case "Previous":
+ if r.TryDecodeAsNil() {
+ x.Previous = false
+ } else {
+ x.Previous = bool(r.DecodeBool())
+ }
+ case "SinceSeconds":
+ if r.TryDecodeAsNil() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ 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_unversioned.Time)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym10 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, false)
+ }
+ }
+ case "Timestamps":
+ if r.TryDecodeAsNil() {
+ x.Timestamps = false
+ } else {
+ x.Timestamps = bool(r.DecodeBool())
+ }
+ case "TailLines":
+ if r.TryDecodeAsNil() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ 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)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Container = ""
+ } else {
+ x.Container = string(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.Follow = false
+ } else {
+ x.Follow = bool(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.Previous = false
+ } else {
+ x.Previous = bool(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() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*int64)(x.SinceSeconds)) = 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() {
+ if x.SinceTime != nil {
+ x.SinceTime = nil
+ }
+ } else {
+ if x.SinceTime == nil {
+ x.SinceTime = new(pkg2_unversioned.Time)
+ }
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym25 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym25 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, 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.Timestamps = false
+ } else {
+ x.Timestamps = bool(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() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int64)(x.TailLines)) = 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() {
+ if x.LimitBytes != nil {
+ x.LimitBytes = nil
+ }
+ } else {
+ if x.LimitBytes == nil {
+ x.LimitBytes = new(int64)
+ }
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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.Stdin != false
+ yyq2[1] = x.Stdout != false
+ yyq2[2] = x.Stderr != false
+ yyq2[3] = x.TTY != false
+ yyq2[4] = x.Container != ""
+ yyq2[5] = x.Kind != ""
+ yyq2[6] = x.APIVersion != ""
+ 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.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ x.Stdout = bool(r.DecodeBool())
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ x.Stderr = bool(r.DecodeBool())
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ x.Container = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ 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.Stdout = false
+ } else {
+ x.Stdout = bool(r.DecodeBool())
+ }
+ 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.Stderr = false
+ } else {
+ x.Stderr = bool(r.DecodeBool())
+ }
+ 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.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ 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.Container = ""
+ } else {
+ x.Container = string(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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[6] = x.Kind != ""
+ yyq2[7] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 6
+ 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.Stdin))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("TTY"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ 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 {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "Stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ case "Stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ x.Stdout = bool(r.DecodeBool())
+ }
+ case "Stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ x.Stderr = bool(r.DecodeBool())
+ }
+ case "TTY":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ case "Container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ x.Container = string(r.DecodeString())
+ }
+ case "Command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv9 := &x.Command
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv9, false, d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Stdin = false
+ } else {
+ x.Stdin = bool(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.Stdout = false
+ } else {
+ x.Stdout = bool(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.Stderr = false
+ } else {
+ x.Stderr = bool(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.TTY = false
+ } else {
+ x.TTY = bool(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.Container = ""
+ } else {
+ x.Container = string(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.Command = nil
+ } else {
+ yyv19 := &x.Command
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(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() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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.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] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ 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 *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 "Path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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 {
+ x.Path = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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.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] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ 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 *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 "Path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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 {
+ x.Path = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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.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] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ 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 *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 "Path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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 {
+ x.Path = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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[4] = x.Controller != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } 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.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ 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.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_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ 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] {
+ if x.Controller == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.Controller
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(yy16))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("controller"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Controller == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.Controller
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *OwnerReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ case "controller":
+ if r.TryDecodeAsNil() {
+ if x.Controller != nil {
+ x.Controller = nil
+ }
+ } else {
+ if x.Controller == nil {
+ x.Controller = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Controller)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *OwnerReference) 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 {
+ x.Kind = string(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 {
+ x.Name = string(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.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(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.Controller != nil {
+ x.Controller = nil
+ }
+ } else {
+ if x.Controller == nil {
+ x.Controller = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Controller)) = 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 *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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 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 {
+ x.Kind = string(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.Namespace = ""
+ } else {
+ x.Namespace = string(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.Name = ""
+ } else {
+ x.Name = string(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.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(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 {
+ x.APIVersion = string(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.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(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.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 *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
+ 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.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_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 {
+ x.Name = string(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 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.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 *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] = true
+ yyq2[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.Reference
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reference"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Reference
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ 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)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "reference":
+ if r.TryDecodeAsNil() {
+ x.Reference = ObjectReference{}
+ } else {
+ yyv4 := &x.Reference
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Reference = ObjectReference{}
+ } else {
+ yyv8 := &x.Reference
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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 {
+ x.Component = string(r.DecodeString())
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ x.Host = string(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 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.Component = ""
+ } else {
+ x.Component = string(r.DecodeString())
+ }
+ 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.Host = ""
+ } else {
+ x.Host = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Reason != ""
+ yyq2[3] = x.Message != ""
+ yyq2[4] = true
+ yyq2[5] = true
+ yyq2[6] = true
+ yyq2[7] = x.Count != 0
+ yyq2[8] = x.Type != ""
+ yyq2[9] = x.Kind != ""
+ yyq2[10] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.InvolvedObject
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("involvedObject"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.InvolvedObject
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Source
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("source"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Source
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yy25 := &x.FirstTimestamp
+ 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[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy27 := &x.FirstTimestamp
+ 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[6] {
+ yy30 := &x.LastTimestamp
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy30) {
+ } else if yym31 {
+ z.EncBinaryMarshal(yy30)
+ } else if !yym31 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy30)
+ } else {
+ z.EncFallback(yy30)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy32 := &x.LastTimestamp
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy32) {
+ } else if yym33 {
+ z.EncBinaryMarshal(yy32)
+ } else if !yym33 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy32)
+ } else {
+ z.EncFallback(yy32)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("count"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "involvedObject":
+ if r.TryDecodeAsNil() {
+ x.InvolvedObject = ObjectReference{}
+ } else {
+ yyv5 := &x.InvolvedObject
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "source":
+ if r.TryDecodeAsNil() {
+ x.Source = EventSource{}
+ } else {
+ yyv8 := &x.Source
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "firstTimestamp":
+ if r.TryDecodeAsNil() {
+ x.FirstTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv9 := &x.FirstTimestamp
+ 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)
+ }
+ }
+ case "lastTimestamp":
+ if r.TryDecodeAsNil() {
+ x.LastTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv11 := &x.LastTimestamp
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(yyv11)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ case "count":
+ if r.TryDecodeAsNil() {
+ x.Count = 0
+ } else {
+ x.Count = int32(r.DecodeInt(32))
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yyv18.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.InvolvedObject = ObjectReference{}
+ } else {
+ yyv19 := &x.InvolvedObject
+ yyv19.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.Reason = ""
+ } else {
+ x.Reason = string(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.Message = ""
+ } else {
+ x.Message = string(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.Source = EventSource{}
+ } else {
+ yyv22 := &x.Source
+ 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.FirstTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv23 := &x.FirstTimestamp
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv23) {
+ } else if yym24 {
+ z.DecBinaryUnmarshal(yyv23)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv23)
+ } else {
+ z.DecFallback(yyv23, 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.LastTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv25 := &x.LastTimestamp
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv25) {
+ } else if yym26 {
+ z.DecBinaryUnmarshal(yyv25)
+ } else if !yym26 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv25)
+ } else {
+ z.DecFallback(yyv25, 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.Count = 0
+ } else {
+ x.Count = 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.Type = ""
+ } else {
+ x.Type = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEvent(([]Event)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceEvent((*[]Event)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEvent((*[]Event)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceruntime_Object(([]pkg7_runtime.Object)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceruntime_Object(([]pkg7_runtime.Object)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceruntime_Object((*[]pkg7_runtime.Object)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 {
+ x.Type = LimitType(r.DecodeString())
+ }
+ 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 {
+ x.Type = LimitType(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.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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = LimitRangeSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Spec = LimitRangeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceLimitRange(([]LimitRange)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceLimitRange((*[]LimitRange)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceLimitRange((*[]LimitRange)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ResourceQuotaSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ResourceQuotaStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ResourceQuotaSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ResourceQuotaStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceResourceQuota((*[]ResourceQuota)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceResourceQuota((*[]ResourceQuota)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = len(x.Data) != 0
+ yyq2[2] = x.Type != ""
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ 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[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv5 := &x.Data
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv5), d)
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = SecretType(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Data = nil
+ } else {
+ yyv12 := &x.Data
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv12), 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.Type = ""
+ } else {
+ x.Type = SecretType(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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceSecret(([]Secret)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceSecret((*[]Secret)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceSecret((*[]Secret)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = len(x.Data) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv5 := &x.Data
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv5, false, d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Data = nil
+ } else {
+ yyv11 := &x.Data
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv11, false, 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceConfigMap(([]ConfigMap)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceConfigMap((*[]ConfigMap)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceConfigMap((*[]ConfigMap)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 PatchType) 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 *PatchType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var 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 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 {
+ x.Type = ComponentConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "error":
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ x.Error = string(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 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 {
+ x.Type = ComponentConditionType(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.Status = ""
+ } else {
+ x.Status = ConditionStatus(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 {
+ x.Message = string(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.Error = ""
+ } else {
+ x.Error = string(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 *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] = true
+ yyq2[1] = len(x.Conditions) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv5 := &x.Conditions
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(yyv5), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Conditions = nil
+ } else {
+ yyv11 := &x.Conditions
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceComponentStatus((*[]ComponentStatus)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceComponentStatus((*[]ComponentStatus)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.User = string(r.DecodeString())
+ }
+ case "role":
+ if r.TryDecodeAsNil() {
+ x.Role = ""
+ } else {
+ x.Role = string(r.DecodeString())
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = string(r.DecodeString())
+ }
+ case "level":
+ if r.TryDecodeAsNil() {
+ x.Level = ""
+ } else {
+ x.Level = string(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 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.User = ""
+ } else {
+ x.User = string(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.Role = ""
+ } else {
+ x.Role = string(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.Type = ""
+ } else {
+ x.Type = string(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.Level = ""
+ } else {
+ x.Level = string(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 *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] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Range))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ 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 {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "range":
+ if r.TryDecodeAsNil() {
+ x.Range = ""
+ } else {
+ x.Range = string(r.DecodeString())
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv6 := &x.Data
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Range = ""
+ } else {
+ x.Range = string(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.Data = nil
+ } else {
+ yyv13 := &x.Data
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *yyv13 = r.DecodeBytes(*(*[]byte)(yyv13), false, 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) encSliceOwnerReference(v []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
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceOwnerReference(v *[]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 = []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, 72)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]OwnerReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]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] = OwnerReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, OwnerReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = OwnerReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, OwnerReference{}) // var yyz1 OwnerReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = OwnerReference{}
+ } 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 = []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 {
+ yyv1[yyj1] = PersistentVolumeAccessMode(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = PersistentVolumeAccessMode(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = PersistentVolumeAccessMode(r.DecodeString())
+ }
+
+ } 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, 456)
+ 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, 352)
+ 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, 32)
+ 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) 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, 32)
+ 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
+ }
+}
+
+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 {
+ yyv1[yyj1] = Capability(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = Capability(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = Capability(r.DecodeString())
+ }
+
+ } 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) 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) 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, 624)
+ 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) 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, 176)
+ 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, 256)
+ 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) 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) 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, 672)
+ 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) 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, 280)
+ 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) 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, 408)
+ 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) 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) 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, 288)
+ 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, 40)
+ 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, 264)
+ 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) 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 {
+ yyv1[yyj1] = UniqueVolumeName(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = UniqueVolumeName(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = UniqueVolumeName(r.DecodeString())
+ }
+
+ } 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) 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 {
+ yymk1 = ResourceName(r.DecodeString())
+ }
+
+ 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 {
+ yymk1 = ResourceName(r.DecodeString())
+ }
+
+ 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, 616)
+ 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 {
+ yyv1[yyj1] = FinalizerName(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = FinalizerName(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = FinalizerName(r.DecodeString())
+ }
+
+ } 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, 280)
+ 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, 488)
+ 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_Object(v []pkg7_runtime.Object, 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)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yyv1) {
+ } else {
+ z.EncFallback(yyv1)
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, 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 = []pkg7_runtime.Object{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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([]pkg7_runtime.Object, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg7_runtime.Object, 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] = nil
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv2) {
+ } else {
+ z.DecFallback(yyv2, true)
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, nil)
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = nil
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, true)
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, nil) // var yyz1 pkg7_runtime.Object
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = nil
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else {
+ z.DecFallback(yyv6, true)
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg7_runtime.Object{}
+ 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, 264)
+ 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 {
+ yyv1[yyj1] = ResourceQuotaScope(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = ResourceQuotaScope(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = ResourceQuotaScope(r.DecodeString())
+ }
+
+ } 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, 288)
+ 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else {
+ *yyv3 = r.DecodeBytes(*(*[]byte)(yyv3), 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), 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.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeUint(uint64(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceuint8(v *[]uint8, 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 = []uint8{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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, 1)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]uint8, yyrl1)
+ }
+ } else {
+ yyv1 = make([]uint8, 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] = 0
+ } else {
+ yyv1[yyj1] = uint8(r.DecodeUint(8))
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, 0)
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = 0
+ } else {
+ yyv1[yyj1] = uint8(r.DecodeUint(8))
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, 0) // var yyz1 uint8
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = 0
+ } else {
+ yyv1[yyj1] = uint8(r.DecodeUint(8))
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []uint8{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+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, 264)
+ 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, 248)
+ 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, 264)
+ 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
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.go
new file mode 100644
index 0000000..7225e8f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/types.go
@@ -0,0 +1,2891 @@
+/*
+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/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/fields"
+ "k8s.io/kubernetes/pkg/labels"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+ "k8s.io/kubernetes/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.
+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.
+ Name string `json:"name,omitempty"`
+
+ // 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).
+ GenerateName string `json:"generateName,omitempty"`
+
+ // 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.
+ Namespace string `json:"namespace,omitempty"`
+
+ // SelfLink is a URL representing this object.
+ SelfLink string `json:"selfLink,omitempty"`
+
+ // 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.
+ UID types.UID `json:"uid,omitempty"`
+
+ // 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.
+ ResourceVersion string `json:"resourceVersion,omitempty"`
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ Generation int64 `json:"generation,omitempty"`
+
+ // 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.
+ CreationTimestamp unversioned.Time `json:"creationTimestamp,omitempty"`
+
+ // DeletionTimestamp is the time after 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 will 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. Once the resource is deleted in the API, the Kubelet
+ // will send a hard termination signal to the container.
+ DeletionTimestamp *unversioned.Time `json:"deletionTimestamp,omitempty"`
+
+ // 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.
+ DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"`
+
+ // 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.
+ // TODO: replace map[string]string with labels.LabelSet type
+ Labels map[string]string `json:"labels,omitempty"`
+
+ // 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.
+ Annotations map[string]string `json:"annotations,omitempty"`
+
+ // 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.
+ OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
+
+ // 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.
+ Finalizers []string `json:"finalizers,omitempty"`
+}
+
+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"
+ // 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 `json:"name"`
+ // 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.
+ VolumeSource `json:",inline,omitempty"`
+}
+
+// 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.
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty"`
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"`
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"`
+ // AWSElasticBlockStore represents an AWS EBS disk that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"`
+ // GitRepo represents a git repository at a particular revision.
+ GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty"`
+ // Secret represents a secret that should populate this volume.
+ Secret *SecretVolumeSource `json:"secret,omitempty"`
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ NFS *NFSVolumeSource `json:"nfs,omitempty"`
+ // ISCSIVolumeSource represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"`
+ // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace
+ PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
+ RBD *RBDVolumeSource `json:"rbd,omitempty"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
+ FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"`
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ Cinder *CinderVolumeSource `json:"cinder,omitempty"`
+
+ // CephFS represents a Cephfs mount on the host that shares a pod's lifetime
+ CephFS *CephFSVolumeSource `json:"cephfs,omitempty"`
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty"`
+
+ // DownwardAPI represents metadata about the pod that should populate this volume
+ DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty"`
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ FC *FCVolumeSource `json:"fc,omitempty"`
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
+ // ConfigMap represents a configMap that should populate this volume
+ ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
+}
+
+// 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.
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"`
+ // AWSElasticBlockStore represents an AWS EBS disk that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"`
+ // 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.
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty"`
+ // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"`
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ NFS *NFSVolumeSource `json:"nfs,omitempty"`
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
+ RBD *RBDVolumeSource `json:"rbd,omitempty"`
+ // ISCSIVolumeSource represents an ISCSI resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
+ FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"`
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ Cinder *CinderVolumeSource `json:"cinder,omitempty"`
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ CephFS *CephFSVolumeSource `json:"cephfs,omitempty"`
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ FC *FCVolumeSource `json:"fc,omitempty"`
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty"`
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
+}
+
+type PersistentVolumeClaimVolumeSource struct {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume
+ ClaimName string `json:"claimName"`
+ // Optional: Defaults to false (read/write). ReadOnly here
+ // will force the ReadOnly setting in VolumeMounts
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+type PersistentVolume struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ //Spec defines a persistent volume owned by the cluster
+ Spec PersistentVolumeSpec `json:"spec,omitempty"`
+
+ // Status represents the current information about persistent volume.
+ Status PersistentVolumeStatus `json:"status,omitempty"`
+}
+
+type PersistentVolumeSpec struct {
+ // Resources represents the actual resources of the volume
+ Capacity ResourceList `json:"capacity"`
+ // Source represents the location and type of a volume to mount.
+ PersistentVolumeSource `json:",inline"`
+ // AccessModes contains all ways the volume can be mounted
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
+ // 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.
+ ClaimRef *ObjectReference `json:"claimRef,omitempty"`
+ // Optional: what happens to a persistent volume when released from its claim.
+ PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"`
+}
+
+// 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
+ Phase PersistentVolumePhase `json:"phase,omitempty"`
+ // A human-readable message indicating details about why the volume is in this state.
+ Message string `json:"message,omitempty"`
+ // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI
+ Reason string `json:"reason,omitempty"`
+}
+
+type PersistentVolumeList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+ Items []PersistentVolume `json:"items"`
+}
+
+// +genclient=true
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+type PersistentVolumeClaim struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the volume requested by a pod author
+ Spec PersistentVolumeClaimSpec `json:"spec,omitempty"`
+
+ // Status represents the current information about a claim
+ Status PersistentVolumeClaimStatus `json:"status,omitempty"`
+}
+
+type PersistentVolumeClaimList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+ Items []PersistentVolumeClaim `json:"items"`
+}
+
+// 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
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
+ // A label query over volumes to consider for binding. This selector is
+ // ignored when VolumeName is set
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+ // Resources represents the minimum resources required
+ Resources ResourceRequirements `json:"resources,omitempty"`
+ // VolumeName is the binding reference to the PersistentVolume backing this
+ // claim. When set to non-empty value Selector is not evaluated
+ VolumeName string `json:"volumeName,omitempty"`
+}
+
+type PersistentVolumeClaimStatus struct {
+ // Phase represents the current phase of PersistentVolumeClaim
+ Phase PersistentVolumeClaimPhase `json:"phase,omitempty"`
+ // AccessModes contains all ways the volume backing the PVC can be mounted
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
+ // Represents the actual resources of the underlying volume
+ Capacity ResourceList `json:"capacity,omitempty"`
+}
+
+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 `json:"path"`
+}
+
+// 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.
+ Medium StorageMedium `json:"medium,omitempty"`
+}
+
+// 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 `json:"pdName"`
+ // 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
+ FSType string `json:"fsType,omitempty"`
+ // 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.
+ Partition int32 `json:"partition,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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)
+ TargetPortal string `json:"targetPortal,omitempty"`
+ // Required: target iSCSI Qualified Name
+ IQN string `json:"iqn,omitempty"`
+ // Required: iSCSI target lun number
+ Lun int32 `json:"lun,omitempty"`
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ ISCSIInterface string `json:"iscsiInterface,omitempty"`
+ // 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
+ FSType string `json:"fsType,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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 world wide names (WWNs)
+ TargetWWNs []string `json:"targetWWNs"`
+ // Required: FC target lun number
+ Lun *int32 `json:"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
+ FSType string `json:"fsType,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using a 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"`
+ // 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.
+ FSType string `json:"fsType,omitempty"`
+ // 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.
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+ // Optional: Extra driver options if any.
+ Options map[string]string `json:"options,omitempty"`
+}
+
+// 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. A 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 `json:"volumeID"`
+ // 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
+ FSType string `json:"fsType,omitempty"`
+ // 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.
+ Partition int32 `json:"partition,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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"`
+ // Commit hash, this is optional
+ Revision string `json:"revision,omitempty"`
+ // 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.
+ Directory string `json:"directory,omitempty"`
+ // 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.
+ SecretName string `json:"secretName,omitempty"`
+ // 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. Paths must be relative and may not contain
+ // the '..' path or start with '..'.
+ Items []KeyToPath `json:"items,omitempty"`
+}
+
+// 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 `json:"server"`
+
+ // Path is the exported NFS share
+ Path string `json:"path"`
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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 `json:"endpoints"`
+
+ // Required: Path is the Glusterfs volume path
+ Path string `json:"path"`
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the Glusterfs to be mounted with read-only permissions
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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 `json:"monitors"`
+ // Required: RBDImage is the rados image name
+ RBDImage string `json:"image"`
+ // 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
+ FSType string `json:"fsType,omitempty"`
+ // Optional: RadosPool is the rados pool name,default is rbd
+ RBDPool string `json:"pool,omitempty"`
+ // Optional: RBDUser is the rados user name, default is admin
+ RadosUser string `json:"user,omitempty"`
+ // Optional: Keyring is the path to key ring for RBDUser, default is /etc/ceph/keyring
+ Keyring string `json:"keyring,omitempty"`
+ // Optional: SecretRef is name of the authentication secret for RBDUser, default is nil.
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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 `json:"volumeID"`
+ // 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"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// 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 `json:"monitors"`
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ Path string `json:"path,omitempty"`
+ // Optional: User is the rados user name, default is admin
+ User string `json:"user,omitempty"`
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ SecretFile string `json:"secretFile,omitempty"`
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+type FlockerVolumeSource struct {
+ // Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
+ DatasetName string `json:"datasetName"`
+}
+
+// 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
+ Items []DownwardAPIVolumeFile `json:"items,omitempty"`
+}
+
+// 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 `json:"path"`
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"`
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"`
+}
+
+// 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"`
+ // Share Name
+ ShareName string `json:"shareName"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ ReadOnly bool `json:"readOnly,omitempty"`
+}
+
+// Represents a vSphere volume resource.
+type VsphereVirtualDiskVolumeSource struct {
+ // Path that identifies vSphere volume vmdk
+ VolumePath string `json:"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.
+ FSType string `json:"fsType,omitempty"`
+}
+
+// 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"`
+ // 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. Paths must be relative and may not contain
+ // the '..' path or start with '..'.
+ Items []KeyToPath `json:"items,omitempty"`
+}
+
+// Maps a string key to a path within a volume.
+type KeyToPath struct {
+ // The key to project.
+ Key string `json:"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"`
+}
+
+// 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.
+ Name string `json:"name,omitempty"`
+ // Optional: If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ HostPort int32 `json:"hostPort,omitempty"`
+ // Required: This must be a valid port number, 0 < x < 65536.
+ ContainerPort int32 `json:"containerPort"`
+ // Required: Supports "TCP" and "UDP".
+ Protocol Protocol `json:"protocol,omitempty"`
+ // Optional: What host IP to bind the external port to.
+ HostIP string `json:"hostIP,omitempty"`
+}
+
+// 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 `json:"name"`
+ // Optional: Defaults to false (read-write).
+ ReadOnly bool `json:"readOnly,omitempty"`
+ // Required. Must not contain ':'.
+ MountPath string `json:"mountPath"`
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ SubPath string `json:"subPath,omitempty"`
+}
+
+// EnvVar represents an environment variable present in a Container.
+type EnvVar struct {
+ // Required: This must be a C_IDENTIFIER.
+ Name string `json:"name"`
+ // 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.
+ Value string `json:"value,omitempty"`
+ // Optional: Specifies a source the value of this var should come from.
+ ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
+}
+
+// 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; only name and namespace are supported.
+ FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"`
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"`
+ // Selects a key of a ConfigMap.
+ ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
+ // Selects a key of a secret in the pod's namespace.
+ SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"`
+}
+
+// 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 `json:"apiVersion"`
+ // Required: Path of the field to select in the specified API version
+ FieldPath string `json:"fieldPath"`
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+type ResourceFieldSelector struct {
+ // Container name: required for volumes, optional for env vars
+ ContainerName string `json:"containerName,omitempty"`
+ // Required: resource to select
+ Resource string `json:"resource"`
+ // Specifies the output format of the exposed resources, defaults to "1"
+ Divisor resource.Quantity `json:"divisor,omitempty"`
+}
+
+// Selects a key from a ConfigMap.
+type ConfigMapKeySelector struct {
+ // The ConfigMap to select from.
+ LocalObjectReference `json:",inline"`
+ // The key to select.
+ Key string `json:"key"`
+}
+
+// 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"`
+ // The key of the secret to select from. Must be a valid secret key.
+ Key string `json:"key"`
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+type HTTPHeader struct {
+ // The header field name
+ Name string `json:"name"`
+ // The header field value
+ Value string `json:"value"`
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+type HTTPGetAction struct {
+ // Optional: Path to access on the HTTP server.
+ Path string `json:"path,omitempty"`
+ // Required: Name or number of the port to access on the container.
+ Port intstr.IntOrString `json:"port,omitempty"`
+ // Optional: Host name to connect to, defaults to the pod IP. You
+ // probably want to set "Host" in httpHeaders instead.
+ Host string `json:"host,omitempty"`
+ // Optional: Scheme to use for connecting to the host, defaults to HTTP.
+ Scheme URIScheme `json:"scheme,omitempty"`
+ // Optional: Custom headers to set in the request. HTTP allows repeated headers.
+ HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"`
+}
+
+// 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.
+ Port intstr.IntOrString `json:"port,omitempty"`
+}
+
+// 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.
+ Command []string `json:"command,omitempty"`
+}
+
+// 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"`
+ // Length of time before health checking is activated. In seconds.
+ InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
+ // Length of time before health checking times out. In seconds.
+ TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
+ // How often (in seconds) to perform the probe.
+ PeriodSeconds int32 `json:"periodSeconds,omitempty"`
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Must be 1 for liveness.
+ SuccessThreshold int32 `json:"successThreshold,omitempty"`
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ FailureThreshold int32 `json:"failureThreshold,omitempty"`
+}
+
+// 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"
+)
+
+// 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
+ Add []Capability `json:"add,omitempty"`
+ // Removed capabilities
+ Drop []Capability `json:"drop,omitempty"`
+}
+
+// ResourceRequirements describes the compute resource requirements.
+type ResourceRequirements struct {
+ // Limits describes the maximum amount of compute resources allowed.
+ Limits ResourceList `json:"limits,omitempty"`
+ // 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
+ Requests ResourceList `json:"requests,omitempty"`
+}
+
+// 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 `json:"name"`
+ // Required.
+ Image string `json:"image"`
+ // 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.
+ Command []string `json:"command,omitempty"`
+ // 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.
+ Args []string `json:"args,omitempty"`
+ // Optional: Defaults to Docker's default.
+ WorkingDir string `json:"workingDir,omitempty"`
+ Ports []ContainerPort `json:"ports,omitempty"`
+ Env []EnvVar `json:"env,omitempty"`
+ // Compute resource requirements.
+ Resources ResourceRequirements `json:"resources,omitempty"`
+ VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`
+ LivenessProbe *Probe `json:"livenessProbe,omitempty"`
+ ReadinessProbe *Probe `json:"readinessProbe,omitempty"`
+ Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
+ // Required.
+ TerminationMessagePath string `json:"terminationMessagePath,omitempty"`
+ // Required: Policy for pulling images for this container
+ ImagePullPolicy PullPolicy `json:"imagePullPolicy"`
+ // Optional: SecurityContext defines the security options the container should be run with.
+ // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
+ SecurityContext *SecurityContext `json:"securityContext,omitempty"`
+
+ // Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
+ // and shouldn't be used for general purpose containers.
+ Stdin bool `json:"stdin,omitempty"`
+ StdinOnce bool `json:"stdinOnce,omitempty"`
+ TTY bool `json:"tty,omitempty"`
+}
+
+// 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.
+ Exec *ExecAction `json:"exec,omitempty"`
+ // HTTPGet specifies the http request to perform.
+ HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
+ // TCPSocket specifies an action involving a TCP port.
+ // TODO: implement a realistic TCP lifecycle hook
+ TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"`
+}
+
+// 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.
+ PostStart *Handler `json:"postStart,omitempty"`
+ // 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.
+ PreStop *Handler `json:"preStop,omitempty"`
+}
+
+// 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.
+ Reason string `json:"reason,omitempty"`
+ // A human-readable message indicating details about why the container is in waiting state.
+ Message string `json:"message,omitempty"`
+}
+
+type ContainerStateRunning struct {
+ StartedAt unversioned.Time `json:"startedAt,omitempty"`
+}
+
+type ContainerStateTerminated struct {
+ ExitCode int32 `json:"exitCode"`
+ Signal int32 `json:"signal,omitempty"`
+ Reason string `json:"reason,omitempty"`
+ Message string `json:"message,omitempty"`
+ StartedAt unversioned.Time `json:"startedAt,omitempty"`
+ FinishedAt unversioned.Time `json:"finishedAt,omitempty"`
+ ContainerID string `json:"containerID,omitempty"`
+}
+
+// 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 {
+ Waiting *ContainerStateWaiting `json:"waiting,omitempty"`
+ Running *ContainerStateRunning `json:"running,omitempty"`
+ Terminated *ContainerStateTerminated `json:"terminated,omitempty"`
+}
+
+type ContainerStatus struct {
+ // Each container in a pod must have a unique name.
+ Name string `json:"name"`
+ State ContainerState `json:"state,omitempty"`
+ LastTerminationState ContainerState `json:"lastState,omitempty"`
+ // Ready specifies whether the container has passed its readiness check.
+ Ready bool `json:"ready"`
+ // 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"`
+ Image string `json:"image"`
+ ImageID string `json:"imageID"`
+ ContainerID string `json:"containerID,omitempty"`
+}
+
+// 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"
+)
+
+type PodCondition struct {
+ Type PodConditionType `json:"type"`
+ Status ConditionStatus `json:"status"`
+ LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
+ Reason string `json:"reason,omitempty"`
+ Message string `json:"message,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Pod `json:"items"`
+}
+
+// DNSPolicy defines how a pod's DNS will be configured.
+type DNSPolicy string
+
+const (
+ // DNSClusterFirst 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.
+ 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 `json:"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"`
+}
+
+// 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 `json:"key" patchStrategy:"merge" patchMergeKey:"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"`
+ // 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.
+ Values []string `json:"values,omitempty"`
+}
+
+// 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.
+ NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty"`
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ PodAffinity *PodAffinity `json:"podAffinity,omitempty"`
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty"`
+}
+
+// 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.
+ // 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.
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
+ // 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.
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
+}
+
+// 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.
+ // 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.
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
+ // 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.
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
+}
+
+// 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 int `json:"weight"`
+ // Required. A pod affinity term, associated with the corresponding weight.
+ PodAffinityTerm PodAffinityTerm `json:"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.
+ LabelSelector *unversioned.LabelSelector `json:"labelSelector,omitempty"`
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // nil list means "this pod's namespace," empty list means "all namespaces"
+ // The json tag here is not "omitempty" since we need to distinguish nil and empty.
+ // See https://golang.org/pkg/encoding/json/#Marshal for more details.
+ Namespaces []string `json:"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.
+ TopologyKey string `json:"topologyKey,omitempty"`
+}
+
+// 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.
+ // 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.
+ RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
+ // 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.
+ PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
+}
+
+// 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"`
+ // A node selector term, associated with the corresponding weight.
+ Preference NodeSelectorTerm `json:"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.
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key"`
+ // Required. The taint value corresponding to the taint key.
+ Value string `json:"value,omitempty"`
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule and PreferNoSchedule.
+ Effect TaintEffect `json:"effect"`
+}
+
+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.
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // do not allow pods to start on Kubelet unless they tolerate the taint,
+ // but allow all already-running pods to continue running.
+ // Enforced by the scheduler and Kubelet.
+ // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit"
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // do not allow pods to start on Kubelet unless they tolerate the taint,
+ // and evict any already-running pods that do not tolerate the taint.
+ // Enforced by the scheduler and Kubelet.
+ // TaintEffectNoScheduleNoAdmitNoExecute = "NoScheduleNoAdmitNoExecute"
+)
+
+// 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 {
+ // Required. Key is the taint key that the toleration applies to.
+ Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"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.
+ Operator TolerationOperator `json:"operator,omitempty"`
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ Value string `json:"value,omitempty"`
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule and PreferNoSchedule.
+ Effect TaintEffect `json:"effect,omitempty"`
+ // TODO: For forgiveness (#1574), we'd eventually add at least a grace period
+ // here, and possibly an occurrence threshold and period.
+}
+
+// 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 `json:"volumes"`
+ // List of initialization containers belonging to the pod.
+ InitContainers []Container `json:"-"`
+ // List of containers belonging to the pod.
+ Containers []Container `json:"containers"`
+ RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
+ // 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.
+ TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
+ // 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
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
+ // Required: Set DNS policy.
+ DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty"`
+ // NodeSelector is a selector which must be true for the pod to fit on a node
+ NodeSelector map[string]string `json:"nodeSelector,omitempty"`
+
+ // 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 `json:"serviceAccountName"`
+
+ // 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.
+ NodeName string `json:"nodeName,omitempty"`
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ SecurityContext *PodSecurityContext `json:"securityContext,omitempty"`
+ // 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.
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
+ // Specifies the hostname of the Pod.
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ Hostname string `json:"hostname,omitempty"`
+ // 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.
+ Subdomain string `json:"subdomain,omitempty"`
+}
+
+// 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
+ HostNetwork bool `json:"hostNetwork,omitempty"`
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ HostPID bool `json:"hostPID,omitempty"`
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ HostIPC bool `json:"hostIPC,omitempty"`
+ // 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.
+ SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"`
+ // 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.
+ RunAsUser *int64 `json:"runAsUser,omitempty"`
+ // 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.
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
+ // 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.
+ SupplementalGroups []int64 `json:"supplementalGroups,omitempty"`
+ // 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.
+ FSGroup *int64 `json:"fsGroup,omitempty"`
+}
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+type PodStatus struct {
+ Phase PodPhase `json:"phase,omitempty"`
+ Conditions []PodCondition `json:"conditions,omitempty"`
+ // A human readable message indicating details about why the pod is in this state.
+ Message string `json:"message,omitempty"`
+ // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'
+ Reason string `json:"reason,omitempty"`
+
+ HostIP string `json:"hostIP,omitempty"`
+ PodIP string `json:"podIP,omitempty"`
+
+ // 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.
+ StartTime *unversioned.Time `json:"startTime,omitempty"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses
+ InitContainerStatuses []ContainerStatus `json:"-"`
+ // 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.
+ ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty"`
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+type PodStatusResult struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+ // Status represents the current information about a pod. This data may not be up
+ // to date.
+ Status PodStatus `json:"status,omitempty"`
+}
+
+// +genclient=true
+
+// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
+type Pod struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the behavior of a pod.
+ Spec PodSpec `json:"spec,omitempty"`
+
+ // Status represents the current information about a pod. This data may not be up
+ // to date.
+ Status PodStatus `json:"status,omitempty"`
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+type PodTemplateSpec struct {
+ // Metadata of the pods created from this template.
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the behavior of a pod.
+ Spec PodSpec `json:"spec,omitempty"`
+}
+
+// +genclient=true
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+type PodTemplate struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Template defines the pods that will be created from this pod template
+ Template PodTemplateSpec `json:"template,omitempty"`
+}
+
+// PodTemplateList is a list of PodTemplates.
+type PodTemplateList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []PodTemplate `json:"items"`
+}
+
+// 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 `json:"replicas"`
+
+ // Selector is a label query over pods that should match the Replicas count.
+ Selector map[string]string `json:"selector"`
+
+ // 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
+ //TemplateRef *ObjectReference `json:"templateRef,omitempty"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Internally, this takes precedence over a
+ // TemplateRef.
+ Template *PodTemplateSpec `json:"template,omitempty"`
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+type ReplicationControllerStatus struct {
+ // Replicas is the number of actual replicas.
+ Replicas int32 `json:"replicas"`
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
+
+ // ObservedGeneration is the most recent generation observed by the controller.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
+}
+
+// +genclient=true
+
+// ReplicationController represents the configuration of a replication controller.
+type ReplicationController struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the desired behavior of this replication controller.
+ Spec ReplicationControllerSpec `json:"spec,omitempty"`
+
+ // Status is the current status of this replication controller. This data may be
+ // out of date by some window of time.
+ Status ReplicationControllerStatus `json:"status,omitempty"`
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+type ReplicationControllerList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []ReplicationController `json:"items"`
+}
+
+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 {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Service `json:"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 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"
+)
+
+// ServiceStatus represents the current status of a service
+type ServiceStatus struct {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty"`
+}
+
+// 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.
+ Ingress []LoadBalancerIngress `json:"ingress,omitempty"`
+}
+
+// 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)
+ IP string `json:"ip,omitempty"`
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ Hostname string `json:"hostname,omitempty"`
+}
+
+// ServiceSpec describes the attributes that a user creates on a service
+type ServiceSpec struct {
+ // Type determines how the service will be exposed. Valid options: ClusterIP, NodePort, LoadBalancer
+ Type ServiceType `json:"type,omitempty"`
+
+ // Required: The list of ports that are exposed by this service.
+ Ports []ServicePort `json:"ports"`
+
+ // This service will route traffic to pods having labels matching this selector. If empty or not present,
+ // the service is assumed to have endpoints set by an external process and Kubernetes will not modify
+ // those endpoints.
+ Selector map[string]string `json:"selector"`
+
+ // ClusterIP is usually assigned by the master. If specified by the user
+ // we will try to respect it or else fail the request. This field can
+ // not be changed by updates.
+ // Valid values are None, empty string (""), or a valid IP address
+ // None can be specified for headless services when proxying is not required
+ ClusterIP string `json:"clusterIP,omitempty"`
+
+ // ExternalIPs are used by external load balancers, or can be set by
+ // users to handle external traffic that arrives at a node.
+ ExternalIPs []string `json:"externalIPs,omitempty"`
+
+ // 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.
+ LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
+
+ // Optional: Supports "ClientIP" and "None". Used to maintain session affinity.
+ SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty"`
+
+ // 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."
+ LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
+}
+
+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 `json:"name"`
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ Protocol Protocol `json:"protocol"`
+
+ // The port that will be exposed on the service.
+ Port int32 `json:"port"`
+
+ // 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 `json:"targetPort"`
+
+ // 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 `json:"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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the behavior of a service.
+ Spec ServiceSpec `json:"spec,omitempty"`
+
+ // Status represents the current status of a service.
+ Status ServiceStatus `json:"status,omitempty"`
+}
+
+// +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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount
+ Secrets []ObjectReference `json:"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.
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+type ServiceAccountList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []ServiceAccount `json:"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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // 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.
+ Hostname string `json:"hostname,omitempty"`
+ // 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 {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Endpoints `json:"items"`
+}
+
+// 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.
+ PodCIDR string `json:"podCIDR,omitempty"`
+
+ // External ID of the node assigned by some machine database (e.g. a cloud provider)
+ ExternalID string `json:"externalID,omitempty"`
+
+ // ID of the node assigned by the cloud provider
+ // Note: format is "<ProviderName>://<ProviderSpecificNodeID>"
+ ProviderID string `json:"providerID,omitempty"`
+
+ // Unschedulable controls node schedulability of new pods. By default node is schedulable.
+ Unschedulable bool `json:"unschedulable,omitempty"`
+}
+
+// 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"`
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+type NodeDaemonEndpoints struct {
+ // Endpoint on which Kubelet is listening.
+ KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty"`
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+type NodeSystemInfo struct {
+ // Machine ID reported by the node.
+ MachineID string `json:"machineID"`
+ // System UUID reported by the node.
+ SystemUUID string `json:"systemUUID"`
+ // Boot ID reported by the node.
+ BootID string `json:"bootID"`
+ // Kernel Version reported by the node.
+ KernelVersion string `json:"kernelVersion"`
+ // OS Image reported by the node.
+ OSImage string `json:"osImage"`
+ // ContainerRuntime Version reported by the node.
+ ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
+ // Kubelet Version reported by the node.
+ KubeletVersion string `json:"kubeletVersion"`
+ // KubeProxy Version reported by the node.
+ KubeProxyVersion string `json:"kubeProxyVersion"`
+ // The Operating System reported by the node
+ OperatingSystem string `json:"operatingSystem"`
+ // The Architecture reported by the node
+ Architecture string `json:"architecture"`
+}
+
+// NodeStatus is information about the current status of a node.
+type NodeStatus struct {
+ // Capacity represents the total resources of a node.
+ Capacity ResourceList `json:"capacity,omitempty"`
+ // Allocatable represents the resources of a node that are available for scheduling.
+ Allocatable ResourceList `json:"allocatable,omitempty"`
+ // NodePhase is the current lifecycle phase of the node.
+ Phase NodePhase `json:"phase,omitempty"`
+ // Conditions is an array of current node conditions.
+ Conditions []NodeCondition `json:"conditions,omitempty"`
+ // Queried from cloud provider, if available.
+ Addresses []NodeAddress `json:"addresses,omitempty"`
+ // Endpoints of daemons running on the Node.
+ DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"`
+ // Set of ids/uuids to uniquely identify the node.
+ NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty"`
+ // List of container images on this node
+ Images []ContainerImage `json:"images,omitempty"`
+ // List of attachable volumes in use (mounted) by the node.
+ VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty"`
+ // List of volumes that are attached to the node.
+ VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty"`
+}
+
+type UniqueVolumeName string
+
+// AttachedVolume describes a volume attached to a node
+type AttachedVolume struct {
+ // Name of the attached volume
+ Name UniqueVolumeName `json:"name"`
+
+ // DevicePath represents the device path where the volume should be available
+ DevicePath string `json:"devicePath"`
+}
+
+// Describe a container image
+type ContainerImage struct {
+ // Names by which this image is known.
+ Names []string `json:"names"`
+ // The size of the image in bytes.
+ SizeBytes int64 `json:"sizeBytes,omitempty"`
+}
+
+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"
+ // NodeNetworkUnavailable means that network for the node is not correctly configured.
+ NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
+)
+
+type NodeCondition struct {
+ Type NodeConditionType `json:"type"`
+ Status ConditionStatus `json:"status"`
+ LastHeartbeatTime unversioned.Time `json:"lastHeartbeatTime,omitempty"`
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
+ Reason string `json:"reason,omitempty"`
+ Message string `json:"message,omitempty"`
+}
+
+type NodeAddressType string
+
+// These are valid address types of node. NodeLegacyHostIP is used to transit
+// from out-dated HostIP field to NodeAddress.
+const (
+ NodeLegacyHostIP NodeAddressType = "LegacyHostIP"
+ NodeHostName NodeAddressType = "Hostname"
+ NodeExternalIP NodeAddressType = "ExternalIP"
+ NodeInternalIP NodeAddressType = "InternalIP"
+)
+
+type NodeAddress struct {
+ Type NodeAddressType `json:"type"`
+ Address string `json:"address"`
+}
+
+// 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 `json:"capacity,omitempty"`
+}
+
+// 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"
+ // 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
+)
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the behavior of a node.
+ Spec NodeSpec `json:"spec,omitempty"`
+
+ // Status describes the current status of a Node
+ Status NodeStatus `json:"status,omitempty"`
+}
+
+// NodeList is a list of nodes.
+type NodeList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Node `json:"items"`
+}
+
+// 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
+}
+
+type FinalizerName string
+
+// These are internal finalizer values to Kubernetes, must be qualified name unless defined here
+const (
+ FinalizerKubernetes FinalizerName = "kubernetes"
+ FinalizerOrphan string = "orphan"
+)
+
+// NamespaceStatus is information about the current status of a Namespace.
+type NamespaceStatus struct {
+ // Phase is the current lifecycle phase of the namespace.
+ Phase NamespacePhase `json:"phase,omitempty"`
+}
+
+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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the behavior of the Namespace.
+ Spec NamespaceSpec `json:"spec,omitempty"`
+
+ // Status describes the current status of a Namespace
+ Status NamespaceStatus `json:"status,omitempty"`
+}
+
+// NamespaceList is a list of Namespaces.
+type NamespaceList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Namespace `json:"items"`
+}
+
+// Binding ties one object to another - for example, a pod is bound to a node by a scheduler.
+type Binding struct {
+ unversioned.TypeMeta `json:",inline"`
+ // ObjectMeta describes the object that is being bound.
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Target is the object to bind to.
+ Target ObjectReference `json:"target"`
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+type Preconditions struct {
+ // Specifies the target UID.
+ UID *types.UID `json:"uid,omitempty"`
+}
+
+// DeleteOptions may be provided when deleting an API object
+type DeleteOptions struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // 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.
+ GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ Preconditions *Preconditions `json:"preconditions,omitempty"`
+
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ OrphanDependents *bool `json:"orphanDependents,omitempty"`
+}
+
+// ExportOptions is the query options to the standard REST get call.
+type ExportOptions struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Should this value be exported. Export strips fields that a user can not specify.
+ Export bool `json:"export"`
+ // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
+ Exact bool `json:"exact"`
+}
+
+// ListOptions is the query options to a standard REST list call, and has future support for
+// watch calls.
+type ListOptions struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // A selector based on labels
+ LabelSelector labels.Selector
+ // A selector based on fields
+ FieldSelector fields.Selector
+ // If true, watch for changes to this list
+ Watch bool
+ // The resource version to watch (no effect on list yet)
+ 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 {
+ unversioned.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 *unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Stdin if true indicates that stdin is to be redirected for the attach call
+ Stdin bool `json:"stdin,omitempty"`
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call
+ Stdout bool `json:"stdout,omitempty"`
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call
+ Stderr bool `json:"stderr,omitempty"`
+
+ // TTY if true indicates that a tty will be allocated for the attach call
+ TTY bool `json:"tty,omitempty"`
+
+ // Container to attach to.
+ Container string `json:"container,omitempty"`
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call
+type PodExecOptions struct {
+ unversioned.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
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call
+type PodProxyOptions struct {
+ unversioned.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 {
+ unversioned.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 {
+ unversioned.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
+}
+
+// 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"`
+ // Kind of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ Kind string `json:"kind"`
+ // Name of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ Name string `json:"name"`
+ // UID of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ UID types.UID `json:"uid"`
+ // If true, this reference points to the managing controller.
+ Controller *bool `json:"controller,omitempty"`
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+type ObjectReference struct {
+ Kind string `json:"kind,omitempty"`
+ Namespace string `json:"namespace,omitempty"`
+ Name string `json:"name,omitempty"`
+ UID types.UID `json:"uid,omitempty"`
+ APIVersion string `json:"apiVersion,omitempty"`
+ ResourceVersion string `json:"resourceVersion,omitempty"`
+
+ // 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.
+ FieldPath string `json:"fieldPath,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+ Reference ObjectReference `json:"reference,omitempty"`
+}
+
+type EventSource struct {
+ // Component from which the event is generated.
+ Component string `json:"component,omitempty"`
+ // Host name on which the event is generated.
+ Host string `json:"host,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Required. The object that this event is about.
+ InvolvedObject ObjectReference `json:"involvedObject,omitempty"`
+
+ // 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.
+ Reason string `json:"reason,omitempty"`
+
+ // Optional. A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ Message string `json:"message,omitempty"`
+
+ // Optional. The component reporting this event. Should be a short machine understandable string.
+ Source EventSource `json:"source,omitempty"`
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ FirstTimestamp unversioned.Time `json:"firstTimestamp,omitempty"`
+
+ // The time at which the most recent occurrence of this event was recorded.
+ LastTimestamp unversioned.Time `json:"lastTimestamp,omitempty"`
+
+ // The number of times this event has occurred.
+ Count int32 `json:"count,omitempty"`
+
+ // Type of this event (Normal, Warning), new types could be added in the future.
+ Type string `json:"type,omitempty"`
+}
+
+// EventList is a list of events.
+type EventList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Event `json:"items"`
+}
+
+// List holds a list of objects, which may not be known by the server.
+type List struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []runtime.Object `json:"items"`
+}
+
+// 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"
+)
+
+// 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
+ Type LimitType `json:"type,omitempty"`
+ // Max usage constraints on this kind by resource name
+ Max ResourceList `json:"max,omitempty"`
+ // Min usage constraints on this kind by resource name
+ Min ResourceList `json:"min,omitempty"`
+ // Default resource requirement limit value by resource name.
+ Default ResourceList `json:"default,omitempty"`
+ // DefaultRequest resource requirement request value by resource name.
+ DefaultRequest ResourceList `json:"defaultRequest,omitempty"`
+ // MaxLimitRequestRatio represents the max burst value for the named resource
+ MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty"`
+}
+
+// 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"`
+}
+
+// +genclient=true
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace
+type LimitRange struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the limits enforced
+ Spec LimitRangeSpec `json:"spec,omitempty"`
+}
+
+// LimitRangeList is a list of LimitRange items.
+type LimitRangeList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is a list of LimitRange objects
+ Items []LimitRange `json:"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"
+ // 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
+ Hard ResourceList `json:"hard,omitempty"`
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ Scopes []ResourceQuotaScope `json:"scopes,omitempty"`
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use
+type ResourceQuotaStatus struct {
+ // Hard is the set of enforced hard limits for each named resource
+ Hard ResourceList `json:"hard,omitempty"`
+ // Used is the current observed total usage of the resource in the namespace
+ Used ResourceList `json:"used,omitempty"`
+}
+
+// +genclient=true
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+type ResourceQuota struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the desired quota
+ Spec ResourceQuotaSpec `json:"spec,omitempty"`
+
+ // Status defines the actual enforced quota and its current usage
+ Status ResourceQuotaStatus `json:"status,omitempty"`
+}
+
+// ResourceQuotaList is a list of ResourceQuota items
+type ResourceQuotaList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is a list of ResourceQuota objects
+ Items []ResourceQuota `json:"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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN
+ // or leading dot followed by valid DNS_SUBDOMAIN.
+ // The serialized form of the secret data is a base64 encoded string,
+ // representing the arbitrary (possibly non-string) data value here.
+ Data map[string][]byte `json:"data,omitempty"`
+
+ // Used to facilitate programmatic handling of secret data.
+ Type SecretType `json:"type,omitempty"`
+}
+
+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 {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []Secret `json:"items"`
+}
+
+// +genclient=true
+
+// ConfigMap holds configuration data for components or applications to consume.
+type ConfigMap struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ // Data contains the configuration data.
+ // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
+ Data map[string]string `json:"data,omitempty"`
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+type ConfigMapList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is the list of ConfigMaps.
+ Items []ConfigMap `json:"items"`
+}
+
+// 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"
+
+ // 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"
+)
+
+// 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"
+)
+
+// 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 `json:"type"`
+ Status ConditionStatus `json:"status"`
+ Message string `json:"message,omitempty"`
+ Error string `json:"error,omitempty"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+type ComponentStatus struct {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+
+ Conditions []ComponentCondition `json:"conditions,omitempty"`
+}
+
+type ComponentStatusList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []ComponentStatus `json:"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.
+ Capabilities *Capabilities `json:"capabilities,omitempty"`
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ Privileged *bool `json:"privileged,omitempty"`
+ // 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.
+ SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"`
+ // 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.
+ RunAsUser *int64 `json:"runAsUser,omitempty"`
+ // 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.
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
+ // 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.
+ ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"`
+}
+
+// SELinuxOptions are the labels to be applied to the container.
+type SELinuxOptions struct {
+ // SELinux user label
+ User string `json:"user,omitempty"`
+ // SELinux role label
+ Role string `json:"role,omitempty"`
+ // SELinux type label
+ Type string `json:"type,omitempty"`
+ // SELinux level label.
+ Level string `json:"level,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+ ObjectMeta `json:"metadata,omitempty"`
+ // 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 `json:"range"`
+ // 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 `json:"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
+
+ // When the --failure-domains scheduler flag is not specified,
+ // DefaultFailureDomains defines the set of label keys used when TopologyKey is empty in PreferredDuringScheduling anti-affinity.
+ DefaultFailureDomains string = unversioned.LabelHostname + "," + unversioned.LabelZoneFailureDomain + "," + unversioned.LabelZoneRegion
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go
new file mode 100644
index 0000000..77f5b66
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go
@@ -0,0 +1,288 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 unversioned
+
+import (
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ time "time"
+)
+
+func DeepCopy_unversioned_APIGroup(in APIGroup, out *APIGroup, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Name = in.Name
+ if in.Versions != nil {
+ in, out := in.Versions, &out.Versions
+ *out = make([]GroupVersionForDiscovery, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Versions = nil
+ }
+ out.PreferredVersion = in.PreferredVersion
+ if in.ServerAddressByClientCIDRs != nil {
+ in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
+ *out = make([]ServerAddressByClientCIDR, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.ServerAddressByClientCIDRs = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_APIGroupList(in APIGroupList, out *APIGroupList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]APIGroup, len(in))
+ for i := range in {
+ if err := DeepCopy_unversioned_APIGroup(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Groups = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_APIResource(in APIResource, out *APIResource, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Namespaced = in.Namespaced
+ out.Kind = in.Kind
+ return nil
+}
+
+func DeepCopy_unversioned_APIResourceList(in APIResourceList, out *APIResourceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.GroupVersion = in.GroupVersion
+ if in.APIResources != nil {
+ in, out := in.APIResources, &out.APIResources
+ *out = make([]APIResource, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.APIResources = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_APIVersions(in APIVersions, out *APIVersions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if in.Versions != nil {
+ in, out := in.Versions, &out.Versions
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Versions = nil
+ }
+ if in.ServerAddressByClientCIDRs != nil {
+ in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
+ *out = make([]ServerAddressByClientCIDR, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.ServerAddressByClientCIDRs = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_Duration(in Duration, out *Duration, c *conversion.Cloner) error {
+ out.Duration = in.Duration
+ return nil
+}
+
+func DeepCopy_unversioned_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func DeepCopy_unversioned_GroupKind(in GroupKind, out *GroupKind, c *conversion.Cloner) error {
+ out.Group = in.Group
+ out.Kind = in.Kind
+ return nil
+}
+
+func DeepCopy_unversioned_GroupResource(in GroupResource, out *GroupResource, c *conversion.Cloner) error {
+ out.Group = in.Group
+ out.Resource = in.Resource
+ return nil
+}
+
+func DeepCopy_unversioned_GroupVersion(in GroupVersion, out *GroupVersion, c *conversion.Cloner) error {
+ out.Group = in.Group
+ out.Version = in.Version
+ return nil
+}
+
+func DeepCopy_unversioned_GroupVersionForDiscovery(in GroupVersionForDiscovery, out *GroupVersionForDiscovery, c *conversion.Cloner) error {
+ out.GroupVersion = in.GroupVersion
+ out.Version = in.Version
+ return nil
+}
+
+func DeepCopy_unversioned_GroupVersionKind(in GroupVersionKind, out *GroupVersionKind, c *conversion.Cloner) error {
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Kind = in.Kind
+ return nil
+}
+
+func DeepCopy_unversioned_GroupVersionResource(in GroupVersionResource, out *GroupVersionResource, c *conversion.Cloner) error {
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ return nil
+}
+
+func DeepCopy_unversioned_LabelSelector(in LabelSelector, out *LabelSelector, c *conversion.Cloner) error {
+ if in.MatchLabels != nil {
+ in, out := in.MatchLabels, &out.MatchLabels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.MatchLabels = nil
+ }
+ if in.MatchExpressions != nil {
+ in, out := in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(in))
+ for i := range in {
+ if err := DeepCopy_unversioned_LabelSelectorRequirement(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_LabelSelectorRequirement(in LabelSelectorRequirement, out *LabelSelectorRequirement, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ if in.Values != nil {
+ in, out := in.Values, &out.Values
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Values = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_ListMeta(in ListMeta, out *ListMeta, c *conversion.Cloner) error {
+ out.SelfLink = in.SelfLink
+ out.ResourceVersion = in.ResourceVersion
+ return nil
+}
+
+func DeepCopy_unversioned_Patch(in Patch, out *Patch, c *conversion.Cloner) error {
+ return nil
+}
+
+func DeepCopy_unversioned_RootPaths(in RootPaths, out *RootPaths, c *conversion.Cloner) error {
+ if in.Paths != nil {
+ in, out := in.Paths, &out.Paths
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Paths = nil
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_ServerAddressByClientCIDR(in ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, c *conversion.Cloner) error {
+ out.ClientCIDR = in.ClientCIDR
+ out.ServerAddress = in.ServerAddress
+ return nil
+}
+
+func DeepCopy_unversioned_Status(in Status, out *Status, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ out.Status = in.Status
+ out.Message = in.Message
+ out.Reason = in.Reason
+ if in.Details != nil {
+ in, out := in.Details, &out.Details
+ *out = new(StatusDetails)
+ if err := DeepCopy_unversioned_StatusDetails(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Details = nil
+ }
+ out.Code = in.Code
+ return nil
+}
+
+func DeepCopy_unversioned_StatusCause(in StatusCause, out *StatusCause, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Message = in.Message
+ out.Field = in.Field
+ return nil
+}
+
+func DeepCopy_unversioned_StatusDetails(in StatusDetails, out *StatusDetails, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Group = in.Group
+ out.Kind = in.Kind
+ if in.Causes != nil {
+ in, out := in.Causes, &out.Causes
+ *out = make([]StatusCause, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Causes = nil
+ }
+ out.RetryAfterSeconds = in.RetryAfterSeconds
+ return nil
+}
+
+func DeepCopy_unversioned_Time(in Time, out *Time, c *conversion.Cloner) error {
+ if newVal, err := c.DeepCopy(in.Time); err != nil {
+ return err
+ } else {
+ out.Time = newVal.(time.Time)
+ }
+ return nil
+}
+
+func DeepCopy_unversioned_Timestamp(in Timestamp, out *Timestamp, c *conversion.Cloner) error {
+ out.Seconds = in.Seconds
+ out.Nanos = in.Nanos
+ return nil
+}
+
+func DeepCopy_unversioned_TypeMeta(in TypeMeta, out *TypeMeta, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.APIVersion = in.APIVersion
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go
new file mode 100644
index 0000000..d0ffc33
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/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
+
+package unversioned
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go
new file mode 100644
index 0000000..ed54e51
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/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 unversioned
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go
new file mode 100644
index 0000000..f0d7147
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go
@@ -0,0 +1,4212 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/unversioned/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package unversioned is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/api/unversioned/generated.proto
+
+ It has these top-level messages:
+ APIGroup
+ APIGroupList
+ APIResource
+ APIResourceList
+ APIVersions
+ Duration
+ ExportOptions
+ GroupKind
+ GroupResource
+ GroupVersion
+ GroupVersionForDiscovery
+ GroupVersionKind
+ GroupVersionResource
+ LabelSelector
+ LabelSelectorRequirement
+ ListMeta
+ RootPaths
+ ServerAddressByClientCIDR
+ Status
+ StatusCause
+ StatusDetails
+ Time
+ Timestamp
+ TypeMeta
+*/
+package unversioned
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import time "time"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *APIGroup) Reset() { *m = APIGroup{} }
+func (m *APIGroup) String() string { return proto.CompactTextString(m) }
+func (*APIGroup) ProtoMessage() {}
+
+func (m *APIGroupList) Reset() { *m = APIGroupList{} }
+func (m *APIGroupList) String() string { return proto.CompactTextString(m) }
+func (*APIGroupList) ProtoMessage() {}
+
+func (m *APIResource) Reset() { *m = APIResource{} }
+func (m *APIResource) String() string { return proto.CompactTextString(m) }
+func (*APIResource) ProtoMessage() {}
+
+func (m *APIResourceList) Reset() { *m = APIResourceList{} }
+func (m *APIResourceList) String() string { return proto.CompactTextString(m) }
+func (*APIResourceList) ProtoMessage() {}
+
+func (m *APIVersions) Reset() { *m = APIVersions{} }
+func (*APIVersions) ProtoMessage() {}
+
+func (m *Duration) Reset() { *m = Duration{} }
+func (m *Duration) String() string { return proto.CompactTextString(m) }
+func (*Duration) ProtoMessage() {}
+
+func (m *ExportOptions) Reset() { *m = ExportOptions{} }
+func (m *ExportOptions) String() string { return proto.CompactTextString(m) }
+func (*ExportOptions) ProtoMessage() {}
+
+func (m *GroupKind) Reset() { *m = GroupKind{} }
+func (*GroupKind) ProtoMessage() {}
+
+func (m *GroupResource) Reset() { *m = GroupResource{} }
+func (*GroupResource) ProtoMessage() {}
+
+func (m *GroupVersion) Reset() { *m = GroupVersion{} }
+func (*GroupVersion) ProtoMessage() {}
+
+func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} }
+func (m *GroupVersionForDiscovery) String() string { return proto.CompactTextString(m) }
+func (*GroupVersionForDiscovery) ProtoMessage() {}
+
+func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} }
+func (*GroupVersionKind) ProtoMessage() {}
+
+func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} }
+func (*GroupVersionResource) ProtoMessage() {}
+
+func (m *LabelSelector) Reset() { *m = LabelSelector{} }
+func (m *LabelSelector) String() string { return proto.CompactTextString(m) }
+func (*LabelSelector) ProtoMessage() {}
+
+func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
+func (m *LabelSelectorRequirement) String() string { return proto.CompactTextString(m) }
+func (*LabelSelectorRequirement) ProtoMessage() {}
+
+func (m *ListMeta) Reset() { *m = ListMeta{} }
+func (m *ListMeta) String() string { return proto.CompactTextString(m) }
+func (*ListMeta) ProtoMessage() {}
+
+func (m *RootPaths) Reset() { *m = RootPaths{} }
+func (m *RootPaths) String() string { return proto.CompactTextString(m) }
+func (*RootPaths) ProtoMessage() {}
+
+func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
+func (m *ServerAddressByClientCIDR) String() string { return proto.CompactTextString(m) }
+func (*ServerAddressByClientCIDR) ProtoMessage() {}
+
+func (m *Status) Reset() { *m = Status{} }
+func (m *Status) String() string { return proto.CompactTextString(m) }
+func (*Status) ProtoMessage() {}
+
+func (m *StatusCause) Reset() { *m = StatusCause{} }
+func (m *StatusCause) String() string { return proto.CompactTextString(m) }
+func (*StatusCause) ProtoMessage() {}
+
+func (m *StatusDetails) Reset() { *m = StatusDetails{} }
+func (m *StatusDetails) String() string { return proto.CompactTextString(m) }
+func (*StatusDetails) ProtoMessage() {}
+
+func (m *Time) Reset() { *m = Time{} }
+func (m *Time) String() string { return proto.CompactTextString(m) }
+func (*Time) ProtoMessage() {}
+
+func (m *Timestamp) Reset() { *m = Timestamp{} }
+func (m *Timestamp) String() string { return proto.CompactTextString(m) }
+func (*Timestamp) ProtoMessage() {}
+
+func (m *TypeMeta) Reset() { *m = TypeMeta{} }
+func (m *TypeMeta) String() string { return proto.CompactTextString(m) }
+func (*TypeMeta) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*APIGroup)(nil), "k8s.io.kubernetes.pkg.api.unversioned.APIGroup")
+ proto.RegisterType((*APIGroupList)(nil), "k8s.io.kubernetes.pkg.api.unversioned.APIGroupList")
+ proto.RegisterType((*APIResource)(nil), "k8s.io.kubernetes.pkg.api.unversioned.APIResource")
+ proto.RegisterType((*APIResourceList)(nil), "k8s.io.kubernetes.pkg.api.unversioned.APIResourceList")
+ proto.RegisterType((*APIVersions)(nil), "k8s.io.kubernetes.pkg.api.unversioned.APIVersions")
+ proto.RegisterType((*Duration)(nil), "k8s.io.kubernetes.pkg.api.unversioned.Duration")
+ proto.RegisterType((*ExportOptions)(nil), "k8s.io.kubernetes.pkg.api.unversioned.ExportOptions")
+ proto.RegisterType((*GroupKind)(nil), "k8s.io.kubernetes.pkg.api.unversioned.GroupKind")
+ proto.RegisterType((*GroupResource)(nil), "k8s.io.kubernetes.pkg.api.unversioned.GroupResource")
+ proto.RegisterType((*GroupVersion)(nil), "k8s.io.kubernetes.pkg.api.unversioned.GroupVersion")
+ proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.kubernetes.pkg.api.unversioned.GroupVersionForDiscovery")
+ proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.kubernetes.pkg.api.unversioned.GroupVersionKind")
+ proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.kubernetes.pkg.api.unversioned.GroupVersionResource")
+ proto.RegisterType((*LabelSelector)(nil), "k8s.io.kubernetes.pkg.api.unversioned.LabelSelector")
+ proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.kubernetes.pkg.api.unversioned.LabelSelectorRequirement")
+ proto.RegisterType((*ListMeta)(nil), "k8s.io.kubernetes.pkg.api.unversioned.ListMeta")
+ proto.RegisterType((*RootPaths)(nil), "k8s.io.kubernetes.pkg.api.unversioned.RootPaths")
+ proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.kubernetes.pkg.api.unversioned.ServerAddressByClientCIDR")
+ proto.RegisterType((*Status)(nil), "k8s.io.kubernetes.pkg.api.unversioned.Status")
+ proto.RegisterType((*StatusCause)(nil), "k8s.io.kubernetes.pkg.api.unversioned.StatusCause")
+ proto.RegisterType((*StatusDetails)(nil), "k8s.io.kubernetes.pkg.api.unversioned.StatusDetails")
+ proto.RegisterType((*Time)(nil), "k8s.io.kubernetes.pkg.api.unversioned.Time")
+ proto.RegisterType((*Timestamp)(nil), "k8s.io.kubernetes.pkg.api.unversioned.Timestamp")
+ proto.RegisterType((*TypeMeta)(nil), "k8s.io.kubernetes.pkg.api.unversioned.TypeMeta")
+}
+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)
+ 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 *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 *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 *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 {
+ for k := range m.MatchLabels {
+ data[i] = 0xa
+ i++
+ v := m.MatchLabels[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 *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()))
+ n2, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ 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()))
+ n3, err := m.Details.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ 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))
+ 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 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))
+ 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 *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 *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 *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 *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))
+ 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 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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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 *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 *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
+ 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
+ if m.MatchLabels == nil {
+ m.MatchLabels = make(map[string]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 *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
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto
new file mode 100644
index 0000000..bb4bf4a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto
@@ -0,0 +1,377 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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.unversioned;
+
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "unversioned";
+
+// 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 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 name of the resource.
+ optional string name = 1;
+
+ // 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;
+}
+
+// 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;
+}
+
+// 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;
+}
+
+// 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 extensiblity.
+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;
+}
+
+// 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.
+ map<string, string> matchLabels = 1;
+
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ 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.
+ 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.
+ 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
+ optional string resourceVersion = 2;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional ListMeta metadata = 1;
+
+ // Status of the operation.
+ // One of: "Success" or "Failure".
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional string status = 2;
+
+ // A human-readable description of the status of this operation.
+ 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 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 StatusDetails details = 5;
+
+ // Suggested HTTP return code for this status, 0 if not set.
+ 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 string reason = 1;
+
+ // A human-readable description of the cause of the error. This field may be
+ // presented as-is to a reader.
+ 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 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 string name = 1;
+
+ // The group attribute of the resource associated with the status StatusReason.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional string kind = 3;
+
+ // The Causes array includes more details associated with the StatusReason
+ // failure. Not all StatusReasons may provide detailed causes.
+ repeated StatusCause causes = 4;
+
+ // If specified, the time in seconds before the operation should be retried.
+ 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
+message Time {
+ // Represents seconds of UTC time since Unix epoch
+ // 1970-01-01T00:00:00Z. Must be from 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
+ optional string apiVersion = 2;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go
new file mode 100644
index 0000000..8f74789
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go
@@ -0,0 +1,287 @@
+/*
+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
+
+import (
+ "encoding/json"
+ "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
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupResource struct {
+ Group string `protobuf:"bytes,1,opt,name=group"`
+ Resource string `protobuf:"bytes,2,opt,name=resource"`
+}
+
+func (gr GroupResource) WithVersion(version string) GroupVersionResource {
+ return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
+}
+
+func (gr GroupResource) IsEmpty() 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 coersion. It doesn't use a GroupVersion to avoid custom marshalling
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupVersionResource struct {
+ Group string `protobuf:"bytes,1,opt,name=group"`
+ Version string `protobuf:"bytes,2,opt,name=version"`
+ Resource string `protobuf:"bytes,3,opt,name=resource"`
+}
+
+func (gvr GroupVersionResource) IsEmpty() 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
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupKind struct {
+ Group string `protobuf:"bytes,1,opt,name=group"`
+ Kind string `protobuf:"bytes,2,opt,name=kind"`
+}
+
+func (gk GroupKind) IsEmpty() 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 coersion. It doesn't use a GroupVersion to avoid custom marshalling
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupVersionKind struct {
+ Group string `protobuf:"bytes,1,opt,name=group"`
+ Version string `protobuf:"bytes,2,opt,name=version"`
+ Kind string `protobuf:"bytes,3,opt,name=kind"`
+}
+
+// IsEmpty returns true if group, version, and kind are empty
+func (gvk GroupVersionKind) IsEmpty() 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.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupVersion struct {
+ Group string `protobuf:"bytes,1,opt,name=group"`
+ Version string `protobuf:"bytes,2,opt,name=version"`
+}
+
+// IsEmpty returns true if group and version are empty
+func (gv GroupVersion) IsEmpty() 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.IsEmpty() {
+ 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
+}
+
+// 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}
+}
+
+// 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 := ParseGroupVersion(s)
+ if err != nil {
+ return err
+ }
+ *gv = parsed
+ 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)
+}
+
+// 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}
+}
+
+// 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.
+// TODO: this belongs in pkg/runtime, move unversioned.GVK into runtime.
+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
+// TODO: this belongs in pkg/runtime, move unversioned.GVK into runtime.
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go
new file mode 100644
index 0000000..fbbff00
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go
@@ -0,0 +1,154 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/labels"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+// 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, labels.EqualsOperator, sets.NewString(v))
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ for _, expr := range ps.MatchExpressions {
+ var op labels.Operator
+ switch expr.Operator {
+ case LabelSelectorOpIn:
+ op = labels.InOperator
+ case LabelSelectorOpNotIn:
+ op = labels.NotInOperator
+ case LabelSelectorOpExists:
+ op = labels.ExistsOperator
+ case LabelSelectorOpDoesNotExist:
+ op = labels.DoesNotExistOperator
+ default:
+ return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
+ }
+ r, err := labels.NewRequirement(expr.Key, op, sets.NewString(expr.Values...))
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ 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 labels.EqualsOperator, labels.DoubleEqualsOperator:
+ 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 labels.InOperator:
+ op = LabelSelectorOpIn
+ case labels.NotInOperator:
+ op = LabelSelectorOpNotIn
+ case labels.ExistsOperator:
+ op = LabelSelectorOpExists
+ case labels.DoesNotExistOperator:
+ op = LabelSelectorOpDoesNotExist
+ case labels.GreaterThanOperator, labels.LessThanOperator:
+ // 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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go
new file mode 100644
index 0000000..48009da
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.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 unversioned
+
+// ListMetaAccessor retrieves the list interface from an object
+// TODO: move this, and TypeMeta and ListMeta, to a different package
+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() ObjectKind { return obj }
+
+// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) SetGroupVersionKind(gvk GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) GroupVersionKind() GroupVersionKind {
+ return FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *ListMeta) GetListMeta() List { return obj }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go
new file mode 100644
index 0000000..9af0566
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go
@@ -0,0 +1,25 @@
+/*
+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 unversioned
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = GroupVersion{Group: "", Version: ""}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go
new file mode 100644
index 0000000..73b00f2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.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 unversioned
+
+import (
+ "encoding/json"
+ "time"
+
+ "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
+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
+}
+
+// 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))
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go
new file mode 100644
index 0000000..ba25e91
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/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 unversioned
+
+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 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go
new file mode 100644
index 0000000..f396487
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go
@@ -0,0 +1,460 @@
+/*
+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 unversioned
+
+import "strings"
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"`
+}
+
+// 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"`
+}
+
+// Status is a return value for calls that don't return other objects.
+type Status struct {
+ TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Status of the operation.
+ // One of: "Success" or "Failure".
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
+ // A human-readable description of the status of this operation.
+ 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.
+ 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.
+ Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"`
+ // Suggested HTTP return code for this status, 0 if not set.
+ 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).
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+ // The group attribute of the resource associated with the status StatusReason.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
+ // The Causes array includes more details associated with the StatusReason
+ // failure. Not all StatusReasons may provide detailed causes.
+ Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"`
+ // If specified, the time in seconds before the operation should be retried.
+ 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.
+ 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.
+ 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"
+ 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.
+ 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 extensiblity.
+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 name of the resource.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // 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"`
+}
+
+// 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.
+ 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.
+ 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.
+ 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.
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go
new file mode 100644
index 0000000..cdd31eb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go
@@ -0,0 +1,208 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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
+
+// 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 name of the resource.",
+ "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')",
+}
+
+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_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_GroupVersionForDiscovery = map[string]string{
+ "": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensiblity.",
+ "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_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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency",
+}
+
+func (ListMeta) SwaggerDoc() map[string]string {
+ return map_ListMeta
+}
+
+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_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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "status": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources",
+}
+
+func (TypeMeta) SwaggerDoc() map[string]string {
+ return map_TypeMeta
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go
new file mode 100644
index 0000000..ecb968b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go
@@ -0,0 +1,74 @@
+/*
+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 (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/util/validation"
+ "k8s.io/kubernetes/pkg/util/validation/field"
+)
+
+func ValidateLabelSelector(ps *unversioned.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 unversioned.LabelSelectorRequirement, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ switch sr.Operator {
+ case unversioned.LabelSelectorOpIn, unversioned.LabelSelectorOpNotIn:
+ if len(sr.Values) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified when `operator` is 'In' or 'NotIn'"))
+ }
+ case unversioned.LabelSelectorOpExists, unversioned.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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go
new file mode 100644
index 0000000..318c6ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go
@@ -0,0 +1,30 @@
+/*
+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
+
+const (
+ // If you add a new topology domain here, also consider adding it to the set of default values
+ // for the scheduler's --failure-domain command-line argument.
+ LabelHostname = "kubernetes.io/hostname"
+ LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone"
+ LabelZoneRegion = "failure-domain.beta.kubernetes.io/region"
+
+ LabelInstanceType = "beta.kubernetes.io/instance-type"
+
+ LabelOS = "beta.kubernetes.io/os"
+ LabelArch = "beta.kubernetes.io/arch"
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go
new file mode 100644
index 0000000..fea2f17
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
new file mode 100644
index 0000000..642b1bc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
@@ -0,0 +1,579 @@
+/*
+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"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+const (
+ // Annotation key used to identify mirror pods.
+ mirrorAnnotationKey = "kubernetes.io/config.mirror"
+
+ // Value used to identify mirror pods from pre-v1.1 kubelet.
+ mirrorAnnotationValue_1_0 = "mirror"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // 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,
+ )
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, kind := range []string{
+ "Endpoints",
+ "ResourceQuota",
+ "PersistentVolumeClaim",
+ "Service",
+ "ServiceAccount",
+ "ConfigMap",
+ } {
+ err = api.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 {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ }
+
+ // Add field conversion funcs.
+ err = api.Scheme.AddFieldLabelConversionFunc("v1", "Pod",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name",
+ "metadata.namespace",
+ "metadata.labels",
+ "metadata.annotations",
+ "status.phase",
+ "status.podIP",
+ "spec.nodeName",
+ "spec.restartPolicy":
+ 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 {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ err = api.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 {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ err = api.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 {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ err = api.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)
+ }
+ })
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ err = api.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)
+ }
+ })
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ err = api.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 {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ err = api.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)
+ }
+ })
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.Selector = in.Selector
+ //if in.TemplateRef != nil {
+ // out.TemplateRef = new(ObjectReference)
+ // if err := Convert_api_ObjectReference_To_v1_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
+ // return err
+ // }
+ //} else {
+ // out.TemplateRef = nil
+ //}
+ 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 {
+ out.Replicas = *in.Replicas
+ out.Selector = in.Selector
+
+ //if in.TemplateRef != nil {
+ // out.TemplateRef = new(api.ObjectReference)
+ // if err := Convert_v1_ObjectReference_To_api_ObjectReference(in.TemplateRef, out.TemplateRef, s); err != nil {
+ // return err
+ // }
+ //} else {
+ // out.TemplateRef = nil
+ //}
+ 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)
+ } else {
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
+ // TODO: when we move init container to beta, remove these conversions
+ 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)
+ }
+ 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: when we move init container to beta, 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)
+ } else {
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
+ // TODO: when we move init container to beta, remove these conversions
+ 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
+ }
+
+ 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)
+ }
+ 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: when we move init container to beta, 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, PodInitContainerStatusesAnnotationKey)
+ }
+ if len(out.Spec.InitContainers) > 0 {
+ value, err := json.Marshal(out.Spec.InitContainers)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainersAnnotationKey] = 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)
+ }
+
+ // We need to reset certain fields for mirror pods from pre-v1.1 kubelet
+ // (#15960).
+ // TODO: Remove this code after we drop support for v1.0 kubelets.
+ if value, ok := in.Annotations[mirrorAnnotationKey]; ok && value == mirrorAnnotationValue_1_0 {
+ // Reset the TerminationGracePeriodSeconds.
+ out.Spec.TerminationGracePeriodSeconds = nil
+ // Reset the resource requests.
+ for i := range out.Spec.Containers {
+ out.Spec.Containers[i].Resources.Requests = nil
+ }
+ }
+ return nil
+}
+
+func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
+ // TODO: when we move init container to beta, remove these conversions
+ 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
+ }
+ 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, PodInitContainerStatusesAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *ServiceSpec, s conversion.Scope) error {
+ if err := autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in, out, s); err != nil {
+ return err
+ }
+ // Publish both externalIPs and deprecatedPublicIPs fields in v1.
+ out.DeprecatedPublicIPs = in.ExternalIPs
+ 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_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.ServiceSpec, s conversion.Scope) error {
+ if err := autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in, out, s); err != nil {
+ return err
+ }
+ // Prefer the legacy deprecatedPublicIPs field, if provided.
+ if len(in.DeprecatedPublicIPs) > 0 {
+ out.ExternalIPs = in.DeprecatedPublicIPs
+ }
+ 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
+}
+
+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 {
+ // 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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go
new file mode 100644
index 0000000..a9cb349
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go
@@ -0,0 +1,6820 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ resource "k8s.io/kubernetes/pkg/api/resource"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ runtime "k8s.io/kubernetes/pkg/runtime"
+ types "k8s.io/kubernetes/pkg/types"
+)
+
+func init() {
+ if err := api.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_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_ConfigMapKeySelector_To_api_ConfigMapKeySelector,
+ Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector,
+ Convert_v1_ConfigMapList_To_api_ConfigMapList,
+ Convert_api_ConfigMapList_To_v1_ConfigMapList,
+ 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_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_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_ExportOptions_To_api_ExportOptions,
+ Convert_api_ExportOptions_To_v1_ExportOptions,
+ 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_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_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_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_OwnerReference_To_api_OwnerReference,
+ Convert_api_OwnerReference_To_v1_OwnerReference,
+ 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_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_PodProxyOptions_To_api_PodProxyOptions,
+ Convert_api_PodProxyOptions_To_v1_PodProxyOptions,
+ Convert_v1_PodSecurityContext_To_api_PodSecurityContext,
+ Convert_api_PodSecurityContext_To_v1_PodSecurityContext,
+ 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_Preconditions_To_api_Preconditions,
+ Convert_api_Preconditions_To_v1_Preconditions,
+ 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_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_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_Secret_To_api_Secret,
+ Convert_api_Secret_To_v1_Secret,
+ 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_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_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_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,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.NodeAffinity != nil {
+ in, out := &in.NodeAffinity, &out.NodeAffinity
+ *out = new(api.NodeAffinity)
+ if err := Convert_v1_NodeAffinity_To_api_NodeAffinity(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NodeAffinity = nil
+ }
+ if in.PodAffinity != nil {
+ in, out := &in.PodAffinity, &out.PodAffinity
+ *out = new(api.PodAffinity)
+ if err := Convert_v1_PodAffinity_To_api_PodAffinity(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PodAffinity = nil
+ }
+ if in.PodAntiAffinity != nil {
+ in, out := &in.PodAntiAffinity, &out.PodAntiAffinity
+ *out = new(api.PodAntiAffinity)
+ if err := Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PodAntiAffinity = nil
+ }
+ return nil
+}
+
+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 {
+ if in.NodeAffinity != nil {
+ in, out := &in.NodeAffinity, &out.NodeAffinity
+ *out = new(NodeAffinity)
+ if err := Convert_api_NodeAffinity_To_v1_NodeAffinity(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NodeAffinity = nil
+ }
+ if in.PodAffinity != nil {
+ in, out := &in.PodAffinity, &out.PodAffinity
+ *out = new(PodAffinity)
+ if err := Convert_api_PodAffinity_To_v1_PodAffinity(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PodAffinity = nil
+ }
+ if in.PodAntiAffinity != nil {
+ in, out := &in.PodAntiAffinity, &out.PodAntiAffinity
+ *out = new(PodAntiAffinity)
+ if err := Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PodAntiAffinity = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Add != nil {
+ in, out := &in.Add, &out.Add
+ *out = make([]api.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = api.Capability((*in)[i])
+ }
+ } else {
+ out.Add = nil
+ }
+ if in.Drop != nil {
+ in, out := &in.Drop, &out.Drop
+ *out = make([]api.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = api.Capability((*in)[i])
+ }
+ } else {
+ out.Drop = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Add != nil {
+ in, out := &in.Add, &out.Add
+ *out = make([]Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = Capability((*in)[i])
+ }
+ } else {
+ out.Add = nil
+ }
+ if in.Drop != nil {
+ in, out := &in.Drop, &out.Drop
+ *out = make([]Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = Capability((*in)[i])
+ }
+ } else {
+ out.Drop = nil
+ }
+ return nil
+}
+
+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 = in.Monitors
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(api.LocalObjectReference)
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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 {
+ out.Monitors = in.Monitors
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]api.ComponentCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ComponentCondition_To_api_ComponentCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(*in))
+ for i := range *in {
+ if err := Convert_api_ComponentCondition_To_v1_ComponentCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.ComponentStatus, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ComponentStatus_To_api_ComponentStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ComponentStatus, len(*in))
+ for i := range *in {
+ if err := Convert_api_ComponentStatus_To_v1_ComponentStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_ConfigMap(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ out.Data = in.Data
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ out.Data = in.Data
+ return nil
+}
+
+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_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
+ return nil
+}
+
+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
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.ConfigMap, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ConfigMap_To_api_ConfigMap(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ConfigMap, len(*in))
+ for i := range *in {
+ if err := Convert_api_ConfigMap_To_v1_ConfigMap(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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_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
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.KeyToPath, len(*in))
+ for i := range *in {
+ if err := Convert_v1_KeyToPath_To_api_KeyToPath(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := Convert_api_KeyToPath_To_v1_KeyToPath(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_Container(in)
+ out.Name = in.Name
+ out.Image = in.Image
+ out.Command = in.Command
+ out.Args = in.Args
+ out.WorkingDir = in.WorkingDir
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]api.ContainerPort, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ContainerPort_To_api_ContainerPort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api.EnvVar, len(*in))
+ for i := range *in {
+ if err := Convert_v1_EnvVar_To_api_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Env = nil
+ }
+ if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api.VolumeMount, len(*in))
+ for i := range *in {
+ if err := Convert_v1_VolumeMount_To_api_VolumeMount(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeMounts = nil
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(api.Probe)
+ if err := Convert_v1_Probe_To_api_Probe(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.LivenessProbe = nil
+ }
+ if in.ReadinessProbe != nil {
+ in, out := &in.ReadinessProbe, &out.ReadinessProbe
+ *out = new(api.Probe)
+ if err := Convert_v1_Probe_To_api_Probe(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ReadinessProbe = nil
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(api.Lifecycle)
+ if err := Convert_v1_Lifecycle_To_api_Lifecycle(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Lifecycle = nil
+ }
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy)
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(api.SecurityContext)
+ if err := Convert_v1_SecurityContext_To_api_SecurityContext(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+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 = in.Command
+ out.Args = in.Args
+ out.WorkingDir = in.WorkingDir
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(*in))
+ for i := range *in {
+ if err := Convert_api_ContainerPort_To_v1_ContainerPort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]EnvVar, len(*in))
+ for i := range *in {
+ if err := Convert_api_EnvVar_To_v1_EnvVar(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Env = nil
+ }
+ if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]VolumeMount, len(*in))
+ for i := range *in {
+ if err := Convert_api_VolumeMount_To_v1_VolumeMount(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeMounts = nil
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(Probe)
+ if err := Convert_api_Probe_To_v1_Probe(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.LivenessProbe = nil
+ }
+ if in.ReadinessProbe != nil {
+ in, out := &in.ReadinessProbe, &out.ReadinessProbe
+ *out = new(Probe)
+ if err := Convert_api_Probe_To_v1_Probe(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ReadinessProbe = nil
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(Lifecycle)
+ if err := Convert_api_Lifecycle_To_v1_Lifecycle(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Lifecycle = nil
+ }
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.ImagePullPolicy = PullPolicy(in.ImagePullPolicy)
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(SecurityContext)
+ if err := Convert_api_SecurityContext_To_v1_SecurityContext(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+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 = in.Names
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+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 {
+ out.Names = in.Names
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+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 {
+ SetDefaults_ContainerPort(in)
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = api.Protocol(in.Protocol)
+ out.HostIP = in.HostIP
+ return nil
+}
+
+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
+}
+
+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 {
+ if in.Waiting != nil {
+ in, out := &in.Waiting, &out.Waiting
+ *out = new(api.ContainerStateWaiting)
+ if err := Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Waiting = nil
+ }
+ if in.Running != nil {
+ in, out := &in.Running, &out.Running
+ *out = new(api.ContainerStateRunning)
+ if err := Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Running = nil
+ }
+ if in.Terminated != nil {
+ in, out := &in.Terminated, &out.Terminated
+ *out = new(api.ContainerStateTerminated)
+ if err := Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Terminated = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Waiting != nil {
+ in, out := &in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ if err := Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Waiting = nil
+ }
+ if in.Running != nil {
+ in, out := &in.Running, &out.Running
+ *out = new(ContainerStateRunning)
+ if err := Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Running = nil
+ }
+ if in.Terminated != nil {
+ in, out := &in.Terminated, &out.Terminated
+ *out = new(ContainerStateTerminated)
+ if err := Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Terminated = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.StartedAt, &out.StartedAt, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.StartedAt, &out.StartedAt, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.StartedAt, &out.StartedAt, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.FinishedAt, &out.FinishedAt, s); err != nil {
+ return err
+ }
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+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
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.StartedAt, &out.StartedAt, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.FinishedAt, &out.FinishedAt, s); err != nil {
+ return err
+ }
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.GracePeriodSeconds = in.GracePeriodSeconds
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ *out = new(api.Preconditions)
+ if err := Convert_v1_Preconditions_To_api_Preconditions(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Preconditions = nil
+ }
+ out.OrphanDependents = in.OrphanDependents
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.GracePeriodSeconds = in.GracePeriodSeconds
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ *out = new(Preconditions)
+ if err := Convert_api_Preconditions_To_v1_Preconditions(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Preconditions = nil
+ }
+ out.OrphanDependents = in.OrphanDependents
+ return nil
+}
+
+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_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardAPIVolumeFile, out *api.DownwardAPIVolumeFile, s conversion.Scope) error {
+ out.Path = in.Path
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(api.ObjectFieldSelector)
+ if err := Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FieldRef = nil
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(api.ResourceFieldSelector)
+ if err := Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ return nil
+}
+
+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
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ if err := Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FieldRef = nil
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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)
+ return nil
+}
+
+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)
+ return nil
+}
+
+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
+ if in.TargetRef != nil {
+ in, out := &in.TargetRef, &out.TargetRef
+ *out = new(api.ObjectReference)
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.TargetRef = nil
+ }
+ return nil
+}
+
+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
+ if in.TargetRef != nil {
+ in, out := &in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.TargetRef = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]api.EndpointAddress, len(*in))
+ for i := range *in {
+ if err := Convert_v1_EndpointAddress_To_api_EndpointAddress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Addresses = nil
+ }
+ if in.NotReadyAddresses != nil {
+ in, out := &in.NotReadyAddresses, &out.NotReadyAddresses
+ *out = make([]api.EndpointAddress, len(*in))
+ for i := range *in {
+ if err := Convert_v1_EndpointAddress_To_api_EndpointAddress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.NotReadyAddresses = nil
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]api.EndpointPort, len(*in))
+ for i := range *in {
+ if err := Convert_v1_EndpointPort_To_api_EndpointPort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := Convert_api_EndpointAddress_To_v1_EndpointAddress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Addresses = nil
+ }
+ if in.NotReadyAddresses != nil {
+ in, out := &in.NotReadyAddresses, &out.NotReadyAddresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := Convert_api_EndpointAddress_To_v1_EndpointAddress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.NotReadyAddresses = nil
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(*in))
+ for i := range *in {
+ if err := Convert_api_EndpointPort_To_v1_EndpointPort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_Endpoints(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if in.Subsets != nil {
+ in, out := &in.Subsets, &out.Subsets
+ *out = make([]api.EndpointSubset, len(*in))
+ for i := range *in {
+ if err := Convert_v1_EndpointSubset_To_api_EndpointSubset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subsets = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if in.Subsets != nil {
+ in, out := &in.Subsets, &out.Subsets
+ *out = make([]EndpointSubset, len(*in))
+ for i := range *in {
+ if err := Convert_api_EndpointSubset_To_v1_EndpointSubset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subsets = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Endpoints, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Endpoints_To_api_Endpoints(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Endpoints, len(*in))
+ for i := range *in {
+ if err := Convert_api_Endpoints_To_v1_Endpoints(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ if in.ValueFrom != nil {
+ in, out := &in.ValueFrom, &out.ValueFrom
+ *out = new(api.EnvVarSource)
+ if err := Convert_v1_EnvVarSource_To_api_EnvVarSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ValueFrom = nil
+ }
+ return nil
+}
+
+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
+ if in.ValueFrom != nil {
+ in, out := &in.ValueFrom, &out.ValueFrom
+ *out = new(EnvVarSource)
+ if err := Convert_api_EnvVarSource_To_v1_EnvVarSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ValueFrom = nil
+ }
+ return nil
+}
+
+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 {
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(api.ObjectFieldSelector)
+ if err := Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FieldRef = nil
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(api.ResourceFieldSelector)
+ if err := Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(api.ConfigMapKeySelector)
+ if err := Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ConfigMapKeyRef = nil
+ }
+ if in.SecretKeyRef != nil {
+ in, out := &in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(api.SecretKeySelector)
+ if err := Convert_v1_SecretKeySelector_To_api_SecretKeySelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretKeyRef = nil
+ }
+ return nil
+}
+
+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 {
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ if err := Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FieldRef = nil
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ if err := Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ConfigMapKeyRef = nil
+ }
+ if in.SecretKeyRef != nil {
+ in, out := &in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ if err := Convert_api_SecretKeySelector_To_v1_SecretKeySelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretKeyRef = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.FirstTimestamp, &out.FirstTimestamp, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTimestamp, &out.LastTimestamp, s); err != nil {
+ return err
+ }
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.FirstTimestamp, &out.FirstTimestamp, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTimestamp, &out.LastTimestamp, s); err != nil {
+ return err
+ }
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Event, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Event_To_api_Event(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Event, len(*in))
+ for i := range *in {
+ if err := Convert_api_Event_To_v1_Event(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 = in.Command
+ return nil
+}
+
+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 = in.Command
+ return nil
+}
+
+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_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func Convert_v1_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error {
+ return autoConvert_v1_ExportOptions_To_api_ExportOptions(in, out, s)
+}
+
+func autoConvert_api_ExportOptions_To_v1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func Convert_api_ExportOptions_To_v1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error {
+ return autoConvert_api_ExportOptions_To_v1_ExportOptions(in, out, s)
+}
+
+func autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
+ out.TargetWWNs = in.TargetWWNs
+ out.Lun = in.Lun
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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 {
+ out.TargetWWNs = in.TargetWWNs
+ out.Lun = in.Lun
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(api.LocalObjectReference)
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ out.Options = in.Options
+ return nil
+}
+
+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
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ out.Options = in.Options
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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 {
+ SetDefaults_HTTPGetAction(in)
+ out.Path = in.Path
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.Port, &out.Port, s); err != nil {
+ return err
+ }
+ out.Host = in.Host
+ out.Scheme = api.URIScheme(in.Scheme)
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]api.HTTPHeader, len(*in))
+ for i := range *in {
+ if err := Convert_v1_HTTPHeader_To_api_HTTPHeader(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.HTTPHeaders = nil
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.Port, &out.Port, s); err != nil {
+ return err
+ }
+ out.Host = in.Host
+ out.Scheme = URIScheme(in.Scheme)
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(*in))
+ for i := range *in {
+ if err := Convert_api_HTTPHeader_To_v1_HTTPHeader(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.HTTPHeaders = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.Exec != nil {
+ in, out := &in.Exec, &out.Exec
+ *out = new(api.ExecAction)
+ if err := Convert_v1_ExecAction_To_api_ExecAction(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Exec = nil
+ }
+ if in.HTTPGet != nil {
+ in, out := &in.HTTPGet, &out.HTTPGet
+ *out = new(api.HTTPGetAction)
+ if err := Convert_v1_HTTPGetAction_To_api_HTTPGetAction(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HTTPGet = nil
+ }
+ if in.TCPSocket != nil {
+ in, out := &in.TCPSocket, &out.TCPSocket
+ *out = new(api.TCPSocketAction)
+ if err := Convert_v1_TCPSocketAction_To_api_TCPSocketAction(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.TCPSocket = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Exec != nil {
+ in, out := &in.Exec, &out.Exec
+ *out = new(ExecAction)
+ if err := Convert_api_ExecAction_To_v1_ExecAction(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Exec = nil
+ }
+ if in.HTTPGet != nil {
+ in, out := &in.HTTPGet, &out.HTTPGet
+ *out = new(HTTPGetAction)
+ if err := Convert_api_HTTPGetAction_To_v1_HTTPGetAction(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HTTPGet = nil
+ }
+ if in.TCPSocket != nil {
+ in, out := &in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ if err := Convert_api_TCPSocketAction_To_v1_TCPSocketAction(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.TCPSocket = nil
+ }
+ return nil
+}
+
+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_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+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
+}
+
+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 {
+ SetDefaults_ISCSIVolumeSource(in)
+ out.TargetPortal = in.TargetPortal
+ out.IQN = in.IQN
+ out.Lun = in.Lun
+ out.ISCSIInterface = in.ISCSIInterface
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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 {
+ if in.PostStart != nil {
+ in, out := &in.PostStart, &out.PostStart
+ *out = new(api.Handler)
+ if err := Convert_v1_Handler_To_api_Handler(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PostStart = nil
+ }
+ if in.PreStop != nil {
+ in, out := &in.PreStop, &out.PreStop
+ *out = new(api.Handler)
+ if err := Convert_v1_Handler_To_api_Handler(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PreStop = nil
+ }
+ return nil
+}
+
+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 {
+ if in.PostStart != nil {
+ in, out := &in.PostStart, &out.PostStart
+ *out = new(Handler)
+ if err := Convert_api_Handler_To_v1_Handler(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PostStart = nil
+ }
+ if in.PreStop != nil {
+ in, out := &in.PreStop, &out.PreStop
+ *out = new(Handler)
+ if err := Convert_api_Handler_To_v1_Handler(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PreStop = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_LimitRangeItem(in)
+ out.Type = api.LimitType(in.Type)
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Max, &out.Max, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Min, &out.Min, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Default, &out.Default, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.DefaultRequest, &out.DefaultRequest, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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)
+ if in.Max != nil {
+ in, out := &in.Max, &out.Max
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Max = nil
+ }
+ if in.Min != nil {
+ in, out := &in.Min, &out.Min
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Min = nil
+ }
+ if in.Default != nil {
+ in, out := &in.Default, &out.Default
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Default = nil
+ }
+ if in.DefaultRequest != nil {
+ in, out := &in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.DefaultRequest = nil
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.MaxLimitRequestRatio = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.LimitRange, len(*in))
+ for i := range *in {
+ if err := Convert_v1_LimitRange_To_api_LimitRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]LimitRange, len(*in))
+ for i := range *in {
+ if err := Convert_api_LimitRange_To_v1_LimitRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make([]api.LimitRangeItem, len(*in))
+ for i := range *in {
+ if err := Convert_v1_LimitRangeItem_To_api_LimitRangeItem(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Limits = nil
+ }
+ return nil
+}
+
+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 {
+ in, out := &in.Limits, &out.Limits
+ *out = make([]LimitRangeItem, len(*in))
+ for i := range *in {
+ if err := Convert_api_LimitRangeItem_To_v1_LimitRangeItem(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Limits = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := api.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = in.TimeoutSeconds
+ return nil
+}
+
+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 := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := api.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = in.TimeoutSeconds
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]api.LoadBalancerIngress, len(*in))
+ for i := range *in {
+ if err := Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(*in))
+ for i := range *in {
+ if err := Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Namespace, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Namespace_To_api_Namespace(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Namespace, len(*in))
+ for i := range *in {
+ if err := Convert_api_Namespace_To_v1_Namespace(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]api.FinalizerName, len(*in))
+ for i := range *in {
+ (*out)[i] = api.FinalizerName((*in)[i])
+ }
+ } else {
+ out.Finalizers = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(*in))
+ for i := range *in {
+ (*out)[i] = FinalizerName((*in)[i])
+ }
+ } else {
+ out.Finalizers = nil
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_NamespaceStatus(in)
+ out.Phase = api.NamespacePhase(in.Phase)
+ return nil
+}
+
+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
+}
+
+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 {
+ SetDefaults_Node(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = new(api.NodeSelector)
+ if err := Convert_v1_NodeSelector_To_api_NodeSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]api.PreferredSchedulingTerm, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+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 {
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = new(NodeSelector)
+ if err := Convert_api_NodeSelector_To_v1_NodeSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PreferredSchedulingTerm, len(*in))
+ for i := range *in {
+ if err := Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastHeartbeatTime, &out.LastHeartbeatTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastHeartbeatTime, &out.LastHeartbeatTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Node, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Node_To_api_Node(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Node, len(*in))
+ for i := range *in {
+ if err := Convert_api_Node_To_v1_Node(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Path = in.Path
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Path = in.Path
+ return nil
+}
+
+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_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.NodeSelector, s conversion.Scope) error {
+ if in.NodeSelectorTerms != nil {
+ in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms
+ *out = make([]api.NodeSelectorTerm, len(*in))
+ for i := range *in {
+ if err := Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.NodeSelectorTerms = nil
+ }
+ return nil
+}
+
+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 {
+ in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms
+ *out = make([]NodeSelectorTerm, len(*in))
+ for i := range *in {
+ if err := Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.NodeSelectorTerms = nil
+ }
+ return nil
+}
+
+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 = in.Values
+ return nil
+}
+
+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 = in.Values
+ return nil
+}
+
+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 {
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]api.NodeSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+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 {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]NodeSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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 {
+ SetDefaults_NodeStatus(in)
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Capacity, &out.Capacity, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Allocatable, &out.Allocatable, s); err != nil {
+ return err
+ }
+ out.Phase = api.NodePhase(in.Phase)
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]api.NodeCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v1_NodeCondition_To_api_NodeCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]api.NodeAddress, len(*in))
+ for i := range *in {
+ if err := Convert_v1_NodeAddress_To_api_NodeAddress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Addresses = nil
+ }
+ 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
+ }
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]api.ContainerImage, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ContainerImage_To_api_ContainerImage(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Images = nil
+ }
+ if in.VolumesInUse != nil {
+ in, out := &in.VolumesInUse, &out.VolumesInUse
+ *out = make([]api.UniqueVolumeName, len(*in))
+ for i := range *in {
+ (*out)[i] = api.UniqueVolumeName((*in)[i])
+ }
+ } else {
+ out.VolumesInUse = nil
+ }
+ if in.VolumesAttached != nil {
+ in, out := &in.VolumesAttached, &out.VolumesAttached
+ *out = make([]api.AttachedVolume, len(*in))
+ for i := range *in {
+ if err := Convert_v1_AttachedVolume_To_api_AttachedVolume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumesAttached = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Capacity = nil
+ }
+ if in.Allocatable != nil {
+ in, out := &in.Allocatable, &out.Allocatable
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Allocatable = nil
+ }
+ out.Phase = NodePhase(in.Phase)
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]NodeCondition, len(*in))
+ for i := range *in {
+ if err := Convert_api_NodeCondition_To_v1_NodeCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(*in))
+ for i := range *in {
+ if err := Convert_api_NodeAddress_To_v1_NodeAddress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Addresses = nil
+ }
+ 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
+ }
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]ContainerImage, len(*in))
+ for i := range *in {
+ if err := Convert_api_ContainerImage_To_v1_ContainerImage(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Images = nil
+ }
+ if in.VolumesInUse != nil {
+ in, out := &in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(*in))
+ for i := range *in {
+ (*out)[i] = UniqueVolumeName((*in)[i])
+ }
+ } else {
+ out.VolumesInUse = nil
+ }
+ if in.VolumesAttached != nil {
+ in, out := &in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(*in))
+ for i := range *in {
+ if err := Convert_api_AttachedVolume_To_v1_AttachedVolume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumesAttached = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ SetDefaults_ObjectFieldSelector(in)
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+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
+}
+
+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
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil {
+ return err
+ }
+ out.DeletionTimestamp = in.DeletionTimestamp
+ out.DeletionGracePeriodSeconds = in.DeletionGracePeriodSeconds
+ out.Labels = in.Labels
+ out.Annotations = in.Annotations
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]api.OwnerReference, len(*in))
+ for i := range *in {
+ if err := Convert_v1_OwnerReference_To_api_OwnerReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.OwnerReferences = nil
+ }
+ out.Finalizers = in.Finalizers
+ return nil
+}
+
+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
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil {
+ return err
+ }
+ out.DeletionTimestamp = in.DeletionTimestamp
+ out.DeletionGracePeriodSeconds = in.DeletionGracePeriodSeconds
+ out.Labels = in.Labels
+ out.Annotations = in.Annotations
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]OwnerReference, len(*in))
+ for i := range *in {
+ if err := Convert_api_OwnerReference_To_v1_OwnerReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.OwnerReferences = nil
+ }
+ out.Finalizers = in.Finalizers
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_OwnerReference_To_api_OwnerReference(in *OwnerReference, out *api.OwnerReference, s conversion.Scope) error {
+ out.APIVersion = in.APIVersion
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.UID = types.UID(in.UID)
+ out.Controller = in.Controller
+ return nil
+}
+
+func Convert_v1_OwnerReference_To_api_OwnerReference(in *OwnerReference, out *api.OwnerReference, s conversion.Scope) error {
+ return autoConvert_v1_OwnerReference_To_api_OwnerReference(in, out, s)
+}
+
+func autoConvert_api_OwnerReference_To_v1_OwnerReference(in *api.OwnerReference, out *OwnerReference, s conversion.Scope) error {
+ out.APIVersion = in.APIVersion
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.UID = types.UID(in.UID)
+ out.Controller = in.Controller
+ return nil
+}
+
+func Convert_api_OwnerReference_To_v1_OwnerReference(in *api.OwnerReference, out *OwnerReference, s conversion.Scope) error {
+ return autoConvert_api_OwnerReference_To_v1_OwnerReference(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error {
+ SetDefaults_PersistentVolume(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ SetDefaults_PersistentVolumeClaim(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]api.PersistentVolumeAccessMode, len(*in))
+ for i := range *in {
+ (*out)[i] = api.PersistentVolumeAccessMode((*in)[i])
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ out.Selector = in.Selector
+ if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ return nil
+}
+
+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 {
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ for i := range *in {
+ (*out)[i] = PersistentVolumeAccessMode((*in)[i])
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ out.Selector = in.Selector
+ if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ return nil
+}
+
+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)
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]api.PersistentVolumeAccessMode, len(*in))
+ for i := range *in {
+ (*out)[i] = api.PersistentVolumeAccessMode((*in)[i])
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Capacity, &out.Capacity, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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)
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ for i := range *in {
+ (*out)[i] = PersistentVolumeAccessMode((*in)[i])
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Capacity = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(api.GCEPersistentDiskVolumeSource)
+ if err := Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(api.AWSElasticBlockStoreVolumeSource)
+ if err := Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(api.HostPathVolumeSource)
+ if err := Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HostPath = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(api.GlusterfsVolumeSource)
+ if err := Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(api.NFSVolumeSource)
+ if err := Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NFS = nil
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(api.RBDVolumeSource)
+ if err := Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RBD = nil
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(api.ISCSIVolumeSource)
+ if err := Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ISCSI = nil
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(api.CinderVolumeSource)
+ if err := Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Cinder = nil
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(api.CephFSVolumeSource)
+ if err := Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.CephFS = nil
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(api.FCVolumeSource)
+ if err := Convert_v1_FCVolumeSource_To_api_FCVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(api.FlockerVolumeSource)
+ if err := Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Flocker = nil
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(api.FlexVolumeSource)
+ if err := Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(api.AzureFileVolumeSource)
+ if err := Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AzureFile = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(api.VsphereVirtualDiskVolumeSource)
+ if err := Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+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 {
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ if err := Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ if err := Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ if err := Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HostPath = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ if err := Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ if err := Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NFS = nil
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RBD = nil
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ISCSI = nil
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ if err := Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Cinder = nil
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.CephFS = nil
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := Convert_api_FCVolumeSource_To_v1_FCVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ if err := Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Flocker = nil
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ if err := Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AzureFile = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ if err := Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+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 {
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Capacity, &out.Capacity, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil {
+ return err
+ }
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]api.PersistentVolumeAccessMode, len(*in))
+ for i := range *in {
+ (*out)[i] = api.PersistentVolumeAccessMode((*in)[i])
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.ClaimRef != nil {
+ in, out := &in.ClaimRef, &out.ClaimRef
+ *out = new(api.ObjectReference)
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ClaimRef = nil
+ }
+ out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
+ return nil
+}
+
+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 {
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Capacity = nil
+ }
+ if err := Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil {
+ return err
+ }
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ for i := range *in {
+ (*out)[i] = PersistentVolumeAccessMode((*in)[i])
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.ClaimRef != nil {
+ in, out := &in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ClaimRef = nil
+ }
+ out.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
+ SetDefaults_Pod(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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 {
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]api.PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]api.WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+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 {
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+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 = in.LabelSelector
+ out.Namespaces = in.Namespaces
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+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 = in.LabelSelector
+ out.Namespaces = in.Namespaces
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+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 {
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]api.PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]api.WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+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 {
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_PodAttachOptions(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+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 {
+ SetDefaults_PodExecOptions(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ out.Command = in.Command
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ out.Command = in.Command
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ out.SinceSeconds = in.SinceSeconds
+ out.SinceTime = in.SinceTime
+ out.Timestamps = in.Timestamps
+ out.TailLines = in.TailLines
+ out.LimitBytes = in.LimitBytes
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ out.SinceSeconds = in.SinceSeconds
+ out.SinceTime = in.SinceTime
+ out.Timestamps = in.Timestamps
+ out.TailLines = in.TailLines
+ out.LimitBytes = in.LimitBytes
+ return nil
+}
+
+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_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Path = in.Path
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Path = in.Path
+ return nil
+}
+
+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 {
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api.SELinuxOptions)
+ if err := Convert_v1_SELinuxOptions_To_api_SELinuxOptions(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.SupplementalGroups = in.SupplementalGroups
+ out.FSGroup = in.FSGroup
+ return nil
+}
+
+func autoConvert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecurityContext, out *PodSecurityContext, s conversion.Scope) error {
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ if err := Convert_api_SELinuxOptions_To_v1_SELinuxOptions(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.SupplementalGroups = in.SupplementalGroups
+ out.FSGroup = in.FSGroup
+ return nil
+}
+
+func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conversion.Scope) error {
+ SetDefaults_PodSpec(in)
+ 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
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]api.Container, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Container_To_api_Container(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.InitContainers = nil
+ }
+ if in.Containers != nil {
+ in, out := &in.Containers, &out.Containers
+ *out = make([]api.Container, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Container_To_api_Container(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Containers = nil
+ }
+ out.RestartPolicy = api.RestartPolicy(in.RestartPolicy)
+ out.TerminationGracePeriodSeconds = in.TerminationGracePeriodSeconds
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ out.DNSPolicy = api.DNSPolicy(in.DNSPolicy)
+ out.NodeSelector = in.NodeSelector
+ out.ServiceAccountName = in.ServiceAccountName
+ out.NodeName = in.NodeName
+ 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
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]api.LocalObjectReference, len(*in))
+ for i := range *in {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ 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
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := Convert_api_Container_To_v1_Container(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.InitContainers = nil
+ }
+ if in.Containers != nil {
+ in, out := &in.Containers, &out.Containers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := Convert_api_Container_To_v1_Container(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Containers = nil
+ }
+ out.RestartPolicy = RestartPolicy(in.RestartPolicy)
+ out.TerminationGracePeriodSeconds = in.TerminationGracePeriodSeconds
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ out.DNSPolicy = DNSPolicy(in.DNSPolicy)
+ out.NodeSelector = in.NodeSelector
+ out.ServiceAccountName = in.ServiceAccountName
+ 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
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ for i := range *in {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ return nil
+}
+
+func autoConvert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus, s conversion.Scope) error {
+ out.Phase = api.PodPhase(in.Phase)
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]api.PodCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PodCondition_To_api_PodCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ out.StartTime = in.StartTime
+ if in.InitContainerStatuses != nil {
+ in, out := &in.InitContainerStatuses, &out.InitContainerStatuses
+ *out = make([]api.ContainerStatus, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ContainerStatus_To_api_ContainerStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.InitContainerStatuses = nil
+ }
+ if in.ContainerStatuses != nil {
+ in, out := &in.ContainerStatuses, &out.ContainerStatuses
+ *out = make([]api.ContainerStatus, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ContainerStatus_To_api_ContainerStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.ContainerStatuses = nil
+ }
+ return nil
+}
+
+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)
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]PodCondition, len(*in))
+ for i := range *in {
+ if err := Convert_api_PodCondition_To_v1_PodCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ out.StartTime = in.StartTime
+ if in.InitContainerStatuses != nil {
+ in, out := &in.InitContainerStatuses, &out.InitContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := Convert_api_ContainerStatus_To_v1_ContainerStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.InitContainerStatuses = nil
+ }
+ if in.ContainerStatuses != nil {
+ in, out := &in.ContainerStatuses, &out.ContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := Convert_api_ContainerStatus_To_v1_ContainerStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.ContainerStatuses = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, 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_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, 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_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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 {
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.Preconditions, s conversion.Scope) error {
+ out.UID = in.UID
+ return nil
+}
+
+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 = in.UID
+ return nil
+}
+
+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_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
+}
+
+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
+}
+
+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 {
+ SetDefaults_Probe(in)
+ 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
+}
+
+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
+}
+
+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_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
+ SetDefaults_RBDVolumeSource(in)
+ out.CephMonitors = in.CephMonitors
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(api.LocalObjectReference)
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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 {
+ out.CephMonitors = in.CephMonitors
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ out.Range = in.Range
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ out.Range = in.Range
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_ReplicationController(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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_ReplicationControllerList_To_api_ReplicationControllerList(in *ReplicationControllerList, out *api.ReplicationControllerList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+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.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+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
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.Divisor, &out.Divisor, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.Divisor, &out.Divisor, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.ResourceQuota, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ResourceQuota_To_api_ResourceQuota(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceQuota, len(*in))
+ for i := range *in {
+ if err := Convert_api_ResourceQuota_To_v1_ResourceQuota(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Hard, &out.Hard, s); err != nil {
+ return err
+ }
+ if in.Scopes != nil {
+ in, out := &in.Scopes, &out.Scopes
+ *out = make([]api.ResourceQuotaScope, len(*in))
+ for i := range *in {
+ (*out)[i] = api.ResourceQuotaScope((*in)[i])
+ }
+ } else {
+ out.Scopes = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Hard = nil
+ }
+ if in.Scopes != nil {
+ in, out := &in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(*in))
+ for i := range *in {
+ (*out)[i] = ResourceQuotaScope((*in)[i])
+ }
+ } else {
+ out.Scopes = nil
+ }
+ return nil
+}
+
+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 {
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Hard, &out.Hard, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Used, &out.Used, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Hard = nil
+ }
+ if in.Used != nil {
+ in, out := &in.Used, &out.Used
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Used = nil
+ }
+ return nil
+}
+
+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 {
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Limits, &out.Limits, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceList_To_api_ResourceList(&in.Requests, &out.Requests, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Limits = nil
+ }
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make(ResourceList, len(*in))
+ for key, val := range *in {
+ newVal := new(resource.Quantity)
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil {
+ return err
+ }
+ (*out)[ResourceName(key)] = *newVal
+ }
+ } else {
+ out.Requests = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error {
+ SetDefaults_Secret(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ out.Data = in.Data
+ out.Type = api.SecretType(in.Type)
+ return nil
+}
+
+func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ out.Data = in.Data
+ out.Type = SecretType(in.Type)
+ return nil
+}
+
+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_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
+ return nil
+}
+
+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
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.KeyToPath, len(*in))
+ for i := range *in {
+ if err := Convert_v1_KeyToPath_To_api_KeyToPath(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := Convert_api_KeyToPath_To_v1_KeyToPath(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Capabilities != nil {
+ in, out := &in.Capabilities, &out.Capabilities
+ *out = new(api.Capabilities)
+ if err := Convert_v1_Capabilities_To_api_Capabilities(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Capabilities = nil
+ }
+ out.Privileged = in.Privileged
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api.SELinuxOptions)
+ if err := Convert_v1_SELinuxOptions_To_api_SELinuxOptions(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+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 {
+ if in.Capabilities != nil {
+ in, out := &in.Capabilities, &out.Capabilities
+ *out = new(Capabilities)
+ if err := Convert_api_Capabilities_To_v1_Capabilities(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Capabilities = nil
+ }
+ out.Privileged = in.Privileged
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ if err := Convert_api_SELinuxOptions_To_v1_SELinuxOptions(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+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 := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if in.Secrets != nil {
+ in, out := &in.Secrets, &out.Secrets
+ *out = make([]api.ObjectReference, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Secrets = nil
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]api.LocalObjectReference, len(*in))
+ for i := range *in {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
+ return err
+ }
+ if in.Secrets != nil {
+ in, out := &in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(*in))
+ for i := range *in {
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Secrets = nil
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ for i := range *in {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.ServiceAccount, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ServiceAccount_To_api_ServiceAccount(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ServiceAccount, len(*in))
+ for i := range *in {
+ if err := Convert_api_ServiceAccount_To_v1_ServiceAccount(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.TargetPort, &out.TargetPort, s); err != nil {
+ return err
+ }
+ out.NodePort = in.NodePort
+ return nil
+}
+
+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
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.TargetPort, &out.TargetPort, s); err != nil {
+ return err
+ }
+ out.NodePort = in.NodePort
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Path = in.Path
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Path = in.Path
+ return nil
+}
+
+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 {
+ SetDefaults_ServiceSpec(in)
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]api.ServicePort, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ServicePort_To_api_ServicePort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ out.Selector = in.Selector
+ out.ClusterIP = in.ClusterIP
+ out.Type = api.ServiceType(in.Type)
+ out.ExternalIPs = in.ExternalIPs
+ out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity)
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges
+ return nil
+}
+
+func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *ServiceSpec, s conversion.Scope) error {
+ out.Type = ServiceType(in.Type)
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ServicePort, len(*in))
+ for i := range *in {
+ if err := Convert_api_ServicePort_To_v1_ServicePort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ out.Selector = in.Selector
+ out.ClusterIP = in.ClusterIP
+ out.ExternalIPs = in.ExternalIPs
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
+ out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error {
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.Port, &out.Port, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.Port, &out.Port, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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)
+ return nil
+}
+
+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)
+ return nil
+}
+
+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)
+ return nil
+}
+
+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)
+ return nil
+}
+
+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 {
+ SetDefaults_Volume(in)
+ out.Name = in.Name
+ if err := Convert_v1_VolumeSource_To_api_VolumeSource(&in.VolumeSource, &out.VolumeSource, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.VolumeSource, s conversion.Scope) error {
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(api.HostPathVolumeSource)
+ if err := Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HostPath = nil
+ }
+ if in.EmptyDir != nil {
+ in, out := &in.EmptyDir, &out.EmptyDir
+ *out = new(api.EmptyDirVolumeSource)
+ if err := Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.EmptyDir = nil
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(api.GCEPersistentDiskVolumeSource)
+ if err := Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(api.AWSElasticBlockStoreVolumeSource)
+ if err := Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.GitRepo != nil {
+ in, out := &in.GitRepo, &out.GitRepo
+ *out = new(api.GitRepoVolumeSource)
+ if err := Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.GitRepo = nil
+ }
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(api.SecretVolumeSource)
+ if err := Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Secret = nil
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(api.NFSVolumeSource)
+ if err := Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NFS = nil
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(api.ISCSIVolumeSource)
+ if err := Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ISCSI = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(api.GlusterfsVolumeSource)
+ if err := Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(api.PersistentVolumeClaimVolumeSource)
+ if err := Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PersistentVolumeClaim = nil
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(api.RBDVolumeSource)
+ if err := Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RBD = nil
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(api.FlexVolumeSource)
+ if err := Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(api.CinderVolumeSource)
+ if err := Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Cinder = nil
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(api.CephFSVolumeSource)
+ if err := Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.CephFS = nil
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(api.FlockerVolumeSource)
+ if err := Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Flocker = nil
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(api.DownwardAPIVolumeSource)
+ if err := Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.DownwardAPI = nil
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(api.FCVolumeSource)
+ if err := Convert_v1_FCVolumeSource_To_api_FCVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(api.AzureFileVolumeSource)
+ if err := Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AzureFile = nil
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(api.ConfigMapVolumeSource)
+ if err := Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ConfigMap = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(api.VsphereVirtualDiskVolumeSource)
+ if err := Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+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 {
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ if err := Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HostPath = nil
+ }
+ if in.EmptyDir != nil {
+ in, out := &in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ if err := Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.EmptyDir = nil
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ if err := Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ if err := Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.GitRepo != nil {
+ in, out := &in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ if err := Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.GitRepo = nil
+ }
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretVolumeSource)
+ if err := Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Secret = nil
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ if err := Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NFS = nil
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ISCSI = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ if err := Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ if err := Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PersistentVolumeClaim = nil
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RBD = nil
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ if err := Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Cinder = nil
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.CephFS = nil
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ if err := Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Flocker = nil
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIVolumeSource)
+ if err := Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.DownwardAPI = nil
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := Convert_api_FCVolumeSource_To_v1_FCVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ if err := Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.AzureFile = nil
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapVolumeSource)
+ if err := Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ConfigMap = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ if err := Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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 = int(in.Weight)
+ if err := Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 = int32(in.Weight)
+ if err := Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go
new file mode 100644
index 0000000..9054da3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go
@@ -0,0 +1,2924 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ runtime "k8s.io/kubernetes/pkg/runtime"
+ types "k8s.io/kubernetes/pkg/types"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1_AWSElasticBlockStoreVolumeSource,
+ DeepCopy_v1_Affinity,
+ DeepCopy_v1_AttachedVolume,
+ DeepCopy_v1_AzureFileVolumeSource,
+ DeepCopy_v1_Binding,
+ DeepCopy_v1_Capabilities,
+ DeepCopy_v1_CephFSVolumeSource,
+ DeepCopy_v1_CinderVolumeSource,
+ DeepCopy_v1_ComponentCondition,
+ DeepCopy_v1_ComponentStatus,
+ DeepCopy_v1_ComponentStatusList,
+ DeepCopy_v1_ConfigMap,
+ DeepCopy_v1_ConfigMapKeySelector,
+ DeepCopy_v1_ConfigMapList,
+ DeepCopy_v1_ConfigMapVolumeSource,
+ DeepCopy_v1_Container,
+ DeepCopy_v1_ContainerImage,
+ DeepCopy_v1_ContainerPort,
+ DeepCopy_v1_ContainerState,
+ DeepCopy_v1_ContainerStateRunning,
+ DeepCopy_v1_ContainerStateTerminated,
+ DeepCopy_v1_ContainerStateWaiting,
+ DeepCopy_v1_ContainerStatus,
+ DeepCopy_v1_DaemonEndpoint,
+ DeepCopy_v1_DeleteOptions,
+ DeepCopy_v1_DownwardAPIVolumeFile,
+ DeepCopy_v1_DownwardAPIVolumeSource,
+ DeepCopy_v1_EmptyDirVolumeSource,
+ DeepCopy_v1_EndpointAddress,
+ DeepCopy_v1_EndpointPort,
+ DeepCopy_v1_EndpointSubset,
+ DeepCopy_v1_Endpoints,
+ DeepCopy_v1_EndpointsList,
+ DeepCopy_v1_EnvVar,
+ DeepCopy_v1_EnvVarSource,
+ DeepCopy_v1_Event,
+ DeepCopy_v1_EventList,
+ DeepCopy_v1_EventSource,
+ DeepCopy_v1_ExecAction,
+ DeepCopy_v1_ExportOptions,
+ DeepCopy_v1_FCVolumeSource,
+ DeepCopy_v1_FlexVolumeSource,
+ DeepCopy_v1_FlockerVolumeSource,
+ DeepCopy_v1_GCEPersistentDiskVolumeSource,
+ DeepCopy_v1_GitRepoVolumeSource,
+ DeepCopy_v1_GlusterfsVolumeSource,
+ DeepCopy_v1_HTTPGetAction,
+ DeepCopy_v1_HTTPHeader,
+ DeepCopy_v1_Handler,
+ DeepCopy_v1_HostPathVolumeSource,
+ DeepCopy_v1_ISCSIVolumeSource,
+ DeepCopy_v1_KeyToPath,
+ DeepCopy_v1_Lifecycle,
+ DeepCopy_v1_LimitRange,
+ DeepCopy_v1_LimitRangeItem,
+ DeepCopy_v1_LimitRangeList,
+ DeepCopy_v1_LimitRangeSpec,
+ DeepCopy_v1_List,
+ DeepCopy_v1_ListOptions,
+ DeepCopy_v1_LoadBalancerIngress,
+ DeepCopy_v1_LoadBalancerStatus,
+ DeepCopy_v1_LocalObjectReference,
+ DeepCopy_v1_NFSVolumeSource,
+ DeepCopy_v1_Namespace,
+ DeepCopy_v1_NamespaceList,
+ DeepCopy_v1_NamespaceSpec,
+ DeepCopy_v1_NamespaceStatus,
+ DeepCopy_v1_Node,
+ DeepCopy_v1_NodeAddress,
+ DeepCopy_v1_NodeAffinity,
+ DeepCopy_v1_NodeCondition,
+ DeepCopy_v1_NodeDaemonEndpoints,
+ DeepCopy_v1_NodeList,
+ DeepCopy_v1_NodeProxyOptions,
+ DeepCopy_v1_NodeSelector,
+ DeepCopy_v1_NodeSelectorRequirement,
+ DeepCopy_v1_NodeSelectorTerm,
+ DeepCopy_v1_NodeSpec,
+ DeepCopy_v1_NodeStatus,
+ DeepCopy_v1_NodeSystemInfo,
+ DeepCopy_v1_ObjectFieldSelector,
+ DeepCopy_v1_ObjectMeta,
+ DeepCopy_v1_ObjectReference,
+ DeepCopy_v1_OwnerReference,
+ DeepCopy_v1_PersistentVolume,
+ DeepCopy_v1_PersistentVolumeClaim,
+ DeepCopy_v1_PersistentVolumeClaimList,
+ DeepCopy_v1_PersistentVolumeClaimSpec,
+ DeepCopy_v1_PersistentVolumeClaimStatus,
+ DeepCopy_v1_PersistentVolumeClaimVolumeSource,
+ DeepCopy_v1_PersistentVolumeList,
+ DeepCopy_v1_PersistentVolumeSource,
+ DeepCopy_v1_PersistentVolumeSpec,
+ DeepCopy_v1_PersistentVolumeStatus,
+ DeepCopy_v1_Pod,
+ DeepCopy_v1_PodAffinity,
+ DeepCopy_v1_PodAffinityTerm,
+ DeepCopy_v1_PodAntiAffinity,
+ DeepCopy_v1_PodAttachOptions,
+ DeepCopy_v1_PodCondition,
+ DeepCopy_v1_PodExecOptions,
+ DeepCopy_v1_PodList,
+ DeepCopy_v1_PodLogOptions,
+ DeepCopy_v1_PodProxyOptions,
+ DeepCopy_v1_PodSecurityContext,
+ DeepCopy_v1_PodSpec,
+ DeepCopy_v1_PodStatus,
+ DeepCopy_v1_PodStatusResult,
+ DeepCopy_v1_PodTemplate,
+ DeepCopy_v1_PodTemplateList,
+ DeepCopy_v1_PodTemplateSpec,
+ DeepCopy_v1_Preconditions,
+ DeepCopy_v1_PreferredSchedulingTerm,
+ DeepCopy_v1_Probe,
+ DeepCopy_v1_RBDVolumeSource,
+ DeepCopy_v1_RangeAllocation,
+ DeepCopy_v1_ReplicationController,
+ DeepCopy_v1_ReplicationControllerList,
+ DeepCopy_v1_ReplicationControllerSpec,
+ DeepCopy_v1_ReplicationControllerStatus,
+ DeepCopy_v1_ResourceFieldSelector,
+ DeepCopy_v1_ResourceQuota,
+ DeepCopy_v1_ResourceQuotaList,
+ DeepCopy_v1_ResourceQuotaSpec,
+ DeepCopy_v1_ResourceQuotaStatus,
+ DeepCopy_v1_ResourceRequirements,
+ DeepCopy_v1_SELinuxOptions,
+ DeepCopy_v1_Secret,
+ DeepCopy_v1_SecretKeySelector,
+ DeepCopy_v1_SecretList,
+ DeepCopy_v1_SecretVolumeSource,
+ DeepCopy_v1_SecurityContext,
+ DeepCopy_v1_SerializedReference,
+ DeepCopy_v1_Service,
+ DeepCopy_v1_ServiceAccount,
+ DeepCopy_v1_ServiceAccountList,
+ DeepCopy_v1_ServiceList,
+ DeepCopy_v1_ServicePort,
+ DeepCopy_v1_ServiceProxyOptions,
+ DeepCopy_v1_ServiceSpec,
+ DeepCopy_v1_ServiceStatus,
+ DeepCopy_v1_TCPSocketAction,
+ DeepCopy_v1_Taint,
+ DeepCopy_v1_Toleration,
+ DeepCopy_v1_Volume,
+ DeepCopy_v1_VolumeMount,
+ DeepCopy_v1_VolumeSource,
+ DeepCopy_v1_VsphereVirtualDiskVolumeSource,
+ DeepCopy_v1_WeightedPodAffinityTerm,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, c *conversion.Cloner) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_Affinity(in Affinity, out *Affinity, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.NodeAffinity = nil
+ }
+ 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
+ }
+ } else {
+ out.PodAffinity = nil
+ }
+ 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
+ }
+ } else {
+ out.PodAntiAffinity = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_AttachedVolume(in AttachedVolume, out *AttachedVolume, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.DevicePath = in.DevicePath
+ return nil
+}
+
+func DeepCopy_v1_AzureFileVolumeSource(in AzureFileVolumeSource, out *AzureFileVolumeSource, c *conversion.Cloner) error {
+ out.SecretName = in.SecretName
+ out.ShareName = in.ShareName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_Binding(in Binding, out *Binding, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Target = in.Target
+ return nil
+}
+
+func DeepCopy_v1_Capabilities(in Capabilities, out *Capabilities, c *conversion.Cloner) error {
+ if in.Add != nil {
+ in, out := in.Add, &out.Add
+ *out = make([]Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Add = nil
+ }
+ if in.Drop != nil {
+ in, out := in.Drop, &out.Drop
+ *out = make([]Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Drop = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_CephFSVolumeSource(in CephFSVolumeSource, out *CephFSVolumeSource, c *conversion.Cloner) error {
+ if in.Monitors != nil {
+ in, out := in.Monitors, &out.Monitors
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Monitors = nil
+ }
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ if in.SecretRef != nil {
+ in, out := in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = *in
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_CinderVolumeSource(in CinderVolumeSource, out *CinderVolumeSource, c *conversion.Cloner) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_ComponentCondition(in ComponentCondition, out *ComponentCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.Message = in.Message
+ out.Error = in.Error
+ return nil
+}
+
+func DeepCopy_v1_ComponentStatus(in ComponentStatus, out *ComponentStatus, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Conditions != nil {
+ in, out := in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Conditions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ComponentStatusList(in ComponentStatusList, out *ComponentStatusList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Data != nil {
+ in, out := in.Data, &out.Data
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Data = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error {
+ out.LocalObjectReference = in.LocalObjectReference
+ out.Key = in.Key
+ return nil
+}
+
+func DeepCopy_v1_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ConfigMapVolumeSource(in ConfigMapVolumeSource, out *ConfigMapVolumeSource, c *conversion.Cloner) error {
+ out.LocalObjectReference = in.LocalObjectReference
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]KeyToPath, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_Container(in Container, out *Container, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Image = in.Image
+ if in.Command != nil {
+ in, out := in.Command, &out.Command
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Command = nil
+ }
+ if in.Args != nil {
+ in, out := in.Args, &out.Args
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Args = nil
+ }
+ out.WorkingDir = in.WorkingDir
+ if in.Ports != nil {
+ in, out := in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ports = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.Env = nil
+ }
+ 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))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.VolumeMounts = nil
+ }
+ 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
+ }
+ } else {
+ out.LivenessProbe = nil
+ }
+ 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
+ }
+ } else {
+ out.ReadinessProbe = nil
+ }
+ 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
+ }
+ } else {
+ out.Lifecycle = nil
+ }
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.ImagePullPolicy = in.ImagePullPolicy
+ 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
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+func DeepCopy_v1_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error {
+ if in.Names != nil {
+ in, out := in.Names, &out.Names
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Names = nil
+ }
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+func DeepCopy_v1_ContainerPort(in ContainerPort, out *ContainerPort, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = in.Protocol
+ out.HostIP = in.HostIP
+ return nil
+}
+
+func DeepCopy_v1_ContainerState(in ContainerState, out *ContainerState, c *conversion.Cloner) error {
+ if in.Waiting != nil {
+ in, out := in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ **out = *in
+ } else {
+ out.Waiting = nil
+ }
+ 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
+ }
+ } else {
+ out.Running = nil
+ }
+ 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
+ }
+ } else {
+ out.Terminated = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ContainerStateRunning(in ContainerStateRunning, out *ContainerStateRunning, c *conversion.Cloner) error {
+ out.StartedAt = in.StartedAt.DeepCopy()
+ return nil
+}
+
+func DeepCopy_v1_ContainerStateTerminated(in ContainerStateTerminated, out *ContainerStateTerminated, c *conversion.Cloner) error {
+ out.ExitCode = in.ExitCode
+ out.Signal = in.Signal
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.StartedAt = in.StartedAt.DeepCopy()
+ out.FinishedAt = in.FinishedAt.DeepCopy()
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+func DeepCopy_v1_ContainerStateWaiting(in ContainerStateWaiting, out *ContainerStateWaiting, c *conversion.Cloner) error {
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_v1_ContainerStatus(in ContainerStatus, out *ContainerStatus, c *conversion.Cloner) error {
+ out.Name = in.Name
+ 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
+ }
+ out.Ready = in.Ready
+ out.RestartCount = in.RestartCount
+ out.Image = in.Image
+ out.ImageID = in.ImageID
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+func DeepCopy_v1_DaemonEndpoint(in DaemonEndpoint, out *DaemonEndpoint, c *conversion.Cloner) error {
+ out.Port = in.Port
+ return nil
+}
+
+func DeepCopy_v1_DeleteOptions(in DeleteOptions, out *DeleteOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if in.GracePeriodSeconds != nil {
+ in, out := in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.GracePeriodSeconds = nil
+ }
+ 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
+ }
+ } else {
+ out.Preconditions = nil
+ }
+ if in.OrphanDependents != nil {
+ in, out := in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.OrphanDependents = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_DownwardAPIVolumeFile(in DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, c *conversion.Cloner) error {
+ out.Path = in.Path
+ if in.FieldRef != nil {
+ in, out := in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = *in
+ } else {
+ out.FieldRef = nil
+ }
+ 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
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_DownwardAPIVolumeSource(in DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_EmptyDirVolumeSource(in EmptyDirVolumeSource, out *EmptyDirVolumeSource, c *conversion.Cloner) error {
+ out.Medium = in.Medium
+ return nil
+}
+
+func DeepCopy_v1_EndpointAddress(in EndpointAddress, out *EndpointAddress, c *conversion.Cloner) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ if in.TargetRef != nil {
+ in, out := in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ **out = *in
+ } else {
+ out.TargetRef = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_EndpointPort(in EndpointPort, out *EndpointPort, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Port = in.Port
+ out.Protocol = in.Protocol
+ return nil
+}
+
+func DeepCopy_v1_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Addresses = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.NotReadyAddresses = nil
+ }
+ if in.Ports != nil {
+ in, out := in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ports = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_Endpoints(in Endpoints, out *Endpoints, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Subsets = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_EndpointsList(in EndpointsList, out *EndpointsList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_EnvVar(in EnvVar, out *EnvVar, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ 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
+ }
+ } else {
+ out.ValueFrom = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion.Cloner) error {
+ if in.FieldRef != nil {
+ in, out := in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = *in
+ } else {
+ out.FieldRef = nil
+ }
+ 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
+ }
+ } else {
+ out.ResourceFieldRef = nil
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ **out = *in
+ } else {
+ out.ConfigMapKeyRef = nil
+ }
+ if in.SecretKeyRef != nil {
+ in, out := in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ **out = *in
+ } else {
+ out.SecretKeyRef = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_Event(in Event, out *Event, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.InvolvedObject = in.InvolvedObject
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.Source = in.Source
+ out.FirstTimestamp = in.FirstTimestamp.DeepCopy()
+ out.LastTimestamp = in.LastTimestamp.DeepCopy()
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+func DeepCopy_v1_EventList(in EventList, out *EventList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_EventSource(in EventSource, out *EventSource, c *conversion.Cloner) error {
+ out.Component = in.Component
+ out.Host = in.Host
+ return nil
+}
+
+func DeepCopy_v1_ExecAction(in ExecAction, out *ExecAction, c *conversion.Cloner) error {
+ if in.Command != nil {
+ in, out := in.Command, &out.Command
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Command = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func DeepCopy_v1_FCVolumeSource(in FCVolumeSource, out *FCVolumeSource, c *conversion.Cloner) error {
+ if in.TargetWWNs != nil {
+ in, out := in.TargetWWNs, &out.TargetWWNs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.TargetWWNs = nil
+ }
+ if in.Lun != nil {
+ in, out := in.Lun, &out.Lun
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Lun = nil
+ }
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_FlexVolumeSource(in FlexVolumeSource, out *FlexVolumeSource, c *conversion.Cloner) error {
+ out.Driver = in.Driver
+ out.FSType = in.FSType
+ if in.SecretRef != nil {
+ in, out := in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = *in
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ if in.Options != nil {
+ in, out := in.Options, &out.Options
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Options = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_FlockerVolumeSource(in FlockerVolumeSource, out *FlockerVolumeSource, c *conversion.Cloner) error {
+ out.DatasetName = in.DatasetName
+ return nil
+}
+
+func DeepCopy_v1_GCEPersistentDiskVolumeSource(in GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, c *conversion.Cloner) error {
+ out.PDName = in.PDName
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_GitRepoVolumeSource(in GitRepoVolumeSource, out *GitRepoVolumeSource, c *conversion.Cloner) error {
+ out.Repository = in.Repository
+ out.Revision = in.Revision
+ out.Directory = in.Directory
+ return nil
+}
+
+func DeepCopy_v1_GlusterfsVolumeSource(in GlusterfsVolumeSource, out *GlusterfsVolumeSource, c *conversion.Cloner) error {
+ out.EndpointsName = in.EndpointsName
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_HTTPGetAction(in HTTPGetAction, out *HTTPGetAction, c *conversion.Cloner) error {
+ out.Path = in.Path
+ out.Port = in.Port
+ out.Host = in.Host
+ out.Scheme = in.Scheme
+ if in.HTTPHeaders != nil {
+ in, out := in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.HTTPHeaders = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_HTTPHeader(in HTTPHeader, out *HTTPHeader, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+func DeepCopy_v1_Handler(in Handler, out *Handler, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.Exec = nil
+ }
+ 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
+ }
+ } else {
+ out.HTTPGet = nil
+ }
+ if in.TCPSocket != nil {
+ in, out := in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ **out = *in
+ } else {
+ out.TCPSocket = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_HostPathVolumeSource(in HostPathVolumeSource, out *HostPathVolumeSource, c *conversion.Cloner) error {
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_v1_ISCSIVolumeSource(in ISCSIVolumeSource, out *ISCSIVolumeSource, c *conversion.Cloner) 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
+ return nil
+}
+
+func DeepCopy_v1_KeyToPath(in KeyToPath, out *KeyToPath, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_v1_Lifecycle(in Lifecycle, out *Lifecycle, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.PostStart = nil
+ }
+ 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
+ }
+ } else {
+ out.PreStop = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_LimitRange(in LimitRange, out *LimitRange, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_LimitRangeSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_LimitRangeItem(in LimitRangeItem, out *LimitRangeItem, c *conversion.Cloner) error {
+ out.Type = in.Type
+ if in.Max != nil {
+ in, out := in.Max, &out.Max
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Max = nil
+ }
+ if in.Min != nil {
+ in, out := in.Min, &out.Min
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Min = nil
+ }
+ if in.Default != nil {
+ in, out := in.Default, &out.Default
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Default = nil
+ }
+ if in.DefaultRequest != nil {
+ in, out := in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.DefaultRequest = nil
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.MaxLimitRequestRatio = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_LimitRangeList(in LimitRangeList, out *LimitRangeList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_LimitRangeSpec(in LimitRangeSpec, out *LimitRangeSpec, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Limits = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_List(in List, out *List, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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.DeepCopy_runtime_RawExtension(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ListOptions(in ListOptions, out *ListOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.LabelSelector = in.LabelSelector
+ out.FieldSelector = in.FieldSelector
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ if in.TimeoutSeconds != nil {
+ in, out := in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TimeoutSeconds = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_LoadBalancerIngress(in LoadBalancerIngress, out *LoadBalancerIngress, c *conversion.Cloner) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ return nil
+}
+
+func DeepCopy_v1_LoadBalancerStatus(in LoadBalancerStatus, out *LoadBalancerStatus, c *conversion.Cloner) error {
+ if in.Ingress != nil {
+ in, out := in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_LocalObjectReference(in LocalObjectReference, out *LocalObjectReference, c *conversion.Cloner) error {
+ out.Name = in.Name
+ return nil
+}
+
+func DeepCopy_v1_NFSVolumeSource(in NFSVolumeSource, out *NFSVolumeSource, c *conversion.Cloner) error {
+ out.Server = in.Server
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_Namespace(in Namespace, out *Namespace, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_NamespaceSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1_NamespaceList(in NamespaceList, out *NamespaceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NamespaceSpec(in NamespaceSpec, out *NamespaceSpec, c *conversion.Cloner) error {
+ if in.Finalizers != nil {
+ in, out := in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Finalizers = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NamespaceStatus(in NamespaceStatus, out *NamespaceStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ return nil
+}
+
+func DeepCopy_v1_Node(in Node, out *Node, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Spec = in.Spec
+ if err := DeepCopy_v1_NodeStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeAddress(in NodeAddress, out *NodeAddress, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Address = in.Address
+ return nil
+}
+
+func DeepCopy_v1_NodeAffinity(in NodeAffinity, out *NodeAffinity, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeCondition(in NodeCondition, out *NodeCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_v1_NodeDaemonEndpoints(in NodeDaemonEndpoints, out *NodeDaemonEndpoints, c *conversion.Cloner) error {
+ out.KubeletEndpoint = in.KubeletEndpoint
+ return nil
+}
+
+func DeepCopy_v1_NodeList(in NodeList, out *NodeList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeProxyOptions(in NodeProxyOptions, out *NodeProxyOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_v1_NodeSelector(in NodeSelector, out *NodeSelector, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.NodeSelectorTerms = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeSelectorRequirement(in NodeSelectorRequirement, out *NodeSelectorRequirement, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ if in.Values != nil {
+ in, out := in.Values, &out.Values
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Values = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeSelectorTerm(in NodeSelectorTerm, out *NodeSelectorTerm, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeSpec(in NodeSpec, out *NodeSpec, c *conversion.Cloner) error {
+ out.PodCIDR = in.PodCIDR
+ out.ExternalID = in.ExternalID
+ out.ProviderID = in.ProviderID
+ out.Unschedulable = in.Unschedulable
+ return nil
+}
+
+func DeepCopy_v1_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Cloner) error {
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ if in.Allocatable != nil {
+ in, out := in.Allocatable, &out.Allocatable
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Allocatable = nil
+ }
+ out.Phase = in.Phase
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.Addresses != nil {
+ in, out := in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Addresses = nil
+ }
+ out.DaemonEndpoints = in.DaemonEndpoints
+ out.NodeInfo = in.NodeInfo
+ 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
+ }
+ }
+ } else {
+ out.Images = nil
+ }
+ if in.VolumesInUse != nil {
+ in, out := in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.VolumesInUse = nil
+ }
+ if in.VolumesAttached != nil {
+ in, out := in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.VolumesAttached = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_NodeSystemInfo(in NodeSystemInfo, out *NodeSystemInfo, c *conversion.Cloner) 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
+}
+
+func DeepCopy_v1_ObjectFieldSelector(in ObjectFieldSelector, out *ObjectFieldSelector, c *conversion.Cloner) error {
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+func DeepCopy_v1_ObjectMeta(in ObjectMeta, out *ObjectMeta, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.GenerateName = in.GenerateName
+ out.Namespace = in.Namespace
+ out.SelfLink = in.SelfLink
+ out.UID = in.UID
+ out.ResourceVersion = in.ResourceVersion
+ out.Generation = in.Generation
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.DeletionTimestamp = nil
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.DeletionGracePeriodSeconds = nil
+ }
+ if in.Labels != nil {
+ in, out := in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Labels = nil
+ }
+ if in.Annotations != nil {
+ in, out := in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Annotations = nil
+ }
+ if in.OwnerReferences != nil {
+ in, out := in.OwnerReferences, &out.OwnerReferences
+ *out = make([]OwnerReference, len(in))
+ for i := range in {
+ if err := DeepCopy_v1_OwnerReference(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.OwnerReferences = nil
+ }
+ if in.Finalizers != nil {
+ in, out := in.Finalizers, &out.Finalizers
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Finalizers = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ObjectReference(in ObjectReference, out *ObjectReference, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ out.UID = in.UID
+ out.APIVersion = in.APIVersion
+ out.ResourceVersion = in.ResourceVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+func DeepCopy_v1_OwnerReference(in OwnerReference, out *OwnerReference, c *conversion.Cloner) error {
+ out.APIVersion = in.APIVersion
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.UID = in.UID
+ if in.Controller != nil {
+ in, out := in.Controller, &out.Controller
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.Controller = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolume(in PersistentVolume, out *PersistentVolume, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PersistentVolumeSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeClaim(in PersistentVolumeClaim, out *PersistentVolumeClaim, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1_PersistentVolumeClaimList(in PersistentVolumeClaimList, out *PersistentVolumeClaimList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeClaimSpec(in PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, c *conversion.Cloner) error {
+ if in.AccessModes != nil {
+ in, out := in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := DeepCopy_v1_ResourceRequirements(in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeClaimStatus(in PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ if in.AccessModes != nil {
+ in, out := in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeClaimVolumeSource(in PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, c *conversion.Cloner) error {
+ out.ClaimName = in.ClaimName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeList(in PersistentVolumeList, out *PersistentVolumeList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_PersistentVolume(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeSource(in PersistentVolumeSource, out *PersistentVolumeSource, c *conversion.Cloner) error {
+ if in.GCEPersistentDisk != nil {
+ in, out := in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = *in
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = *in
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.HostPath != nil {
+ in, out := in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = *in
+ } else {
+ out.HostPath = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = *in
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.NFS != nil {
+ in, out := in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = *in
+ } else {
+ out.NFS = nil
+ }
+ 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
+ }
+ } else {
+ out.RBD = nil
+ }
+ if in.ISCSI != nil {
+ in, out := in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ **out = *in
+ } else {
+ out.ISCSI = nil
+ }
+ if in.Cinder != nil {
+ in, out := in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = *in
+ } else {
+ out.Cinder = nil
+ }
+ 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
+ }
+ } else {
+ out.CephFS = nil
+ }
+ 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
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.Flocker != nil {
+ in, out := in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = *in
+ } else {
+ out.Flocker = nil
+ }
+ 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
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.AzureFile != nil {
+ in, out := in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = *in
+ } else {
+ out.AzureFile = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = *in
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeSpec(in PersistentVolumeSpec, out *PersistentVolumeSpec, c *conversion.Cloner) error {
+ if in.Capacity != nil {
+ in, out := in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Capacity = nil
+ }
+ 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))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AccessModes = nil
+ }
+ if in.ClaimRef != nil {
+ in, out := in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ **out = *in
+ } else {
+ out.ClaimRef = nil
+ }
+ out.PersistentVolumeReclaimPolicy = in.PersistentVolumeReclaimPolicy
+ return nil
+}
+
+func DeepCopy_v1_PersistentVolumeStatus(in PersistentVolumeStatus, out *PersistentVolumeStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ out.Message = in.Message
+ out.Reason = in.Reason
+ return nil
+}
+
+func DeepCopy_v1_Pod(in Pod, out *Pod, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1_PodAffinity(in PodAffinity, out *PodAffinity, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodAffinityTerm(in PodAffinityTerm, out *PodAffinityTerm, c *conversion.Cloner) error {
+ if in.LabelSelector != nil {
+ in, out := in.LabelSelector, &out.LabelSelector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.LabelSelector = nil
+ }
+ if in.Namespaces != nil {
+ in, out := in.Namespaces, &out.Namespaces
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Namespaces = nil
+ }
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+func DeepCopy_v1_PodAntiAffinity(in PodAntiAffinity, out *PodAntiAffinity, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodAttachOptions(in PodAttachOptions, out *PodAttachOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+func DeepCopy_v1_PodCondition(in PodCondition, out *PodCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_v1_PodExecOptions(in PodExecOptions, out *PodExecOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ if in.Command != nil {
+ in, out := in.Command, &out.Command
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Command = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodList(in PodList, out *PodList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_Pod(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodLogOptions(in PodLogOptions, out *PodLogOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ if in.SinceSeconds != nil {
+ in, out := in.SinceSeconds, &out.SinceSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.SinceSeconds = nil
+ }
+ if in.SinceTime != nil {
+ in, out := in.SinceTime, &out.SinceTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.SinceTime = nil
+ }
+ out.Timestamps = in.Timestamps
+ if in.TailLines != nil {
+ in, out := in.TailLines, &out.TailLines
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TailLines = nil
+ }
+ if in.LimitBytes != nil {
+ in, out := in.LimitBytes, &out.LimitBytes
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.LimitBytes = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodProxyOptions(in PodProxyOptions, out *PodProxyOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_v1_PodSecurityContext(in PodSecurityContext, out *PodSecurityContext, c *conversion.Cloner) error {
+ if in.SELinuxOptions != nil {
+ in, out := in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = *in
+ } else {
+ out.SELinuxOptions = nil
+ }
+ if in.RunAsUser != nil {
+ in, out := in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.RunAsUser = nil
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.RunAsNonRoot = nil
+ }
+ if in.SupplementalGroups != nil {
+ in, out := in.SupplementalGroups, &out.SupplementalGroups
+ *out = make([]int64, len(in))
+ copy(*out, in)
+ } else {
+ out.SupplementalGroups = nil
+ }
+ if in.FSGroup != nil {
+ in, out := in.FSGroup, &out.FSGroup
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.FSGroup = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodSpec(in PodSpec, out *PodSpec, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.InitContainers = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.Containers = nil
+ }
+ out.RestartPolicy = in.RestartPolicy
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TerminationGracePeriodSeconds = nil
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ActiveDeadlineSeconds = nil
+ }
+ out.DNSPolicy = in.DNSPolicy
+ if in.NodeSelector != nil {
+ in, out := in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.NodeSelector = nil
+ }
+ out.ServiceAccountName = in.ServiceAccountName
+ out.DeprecatedServiceAccount = in.DeprecatedServiceAccount
+ out.NodeName = in.NodeName
+ out.HostNetwork = in.HostNetwork
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ 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
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ return nil
+}
+
+func DeepCopy_v1_PodStatus(in PodStatus, out *PodStatus, c *conversion.Cloner) error {
+ out.Phase = in.Phase
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ if in.StartTime != nil {
+ in, out := in.StartTime, &out.StartTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.StartTime = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.InitContainerStatuses = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.ContainerStatuses = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodStatusResult(in PodStatusResult, out *PodStatusResult, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PodStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodTemplate(in PodTemplate, out *PodTemplate, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodTemplateList(in PodTemplateList, out *PodTemplateList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_PodTemplate(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PodTemplateSpec(in PodTemplateSpec, out *PodTemplateSpec, c *conversion.Cloner) error {
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PodSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_Preconditions(in Preconditions, out *Preconditions, c *conversion.Cloner) error {
+ if in.UID != nil {
+ in, out := in.UID, &out.UID
+ *out = new(types.UID)
+ **out = *in
+ } else {
+ out.UID = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_PreferredSchedulingTerm(in PreferredSchedulingTerm, out *PreferredSchedulingTerm, c *conversion.Cloner) error {
+ out.Weight = in.Weight
+ if err := DeepCopy_v1_NodeSelectorTerm(in.Preference, &out.Preference, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_Probe(in Probe, out *Probe, c *conversion.Cloner) error {
+ if err := DeepCopy_v1_Handler(in.Handler, &out.Handler, c); 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
+}
+
+func DeepCopy_v1_RBDVolumeSource(in RBDVolumeSource, out *RBDVolumeSource, c *conversion.Cloner) error {
+ if in.CephMonitors != nil {
+ in, out := in.CephMonitors, &out.CephMonitors
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.CephMonitors = nil
+ }
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ if in.SecretRef != nil {
+ in, out := in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = *in
+ } else {
+ out.SecretRef = nil
+ }
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+func DeepCopy_v1_RangeAllocation(in RangeAllocation, out *RangeAllocation, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Range = in.Range
+ if in.Data != nil {
+ in, out := in.Data, &out.Data
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Data = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ReplicationController(in ReplicationController, out *ReplicationController, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ReplicationControllerSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1_ReplicationControllerList(in ReplicationControllerList, out *ReplicationControllerList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_ReplicationController(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ReplicationControllerSpec(in ReplicationControllerSpec, out *ReplicationControllerSpec, c *conversion.Cloner) error {
+ if in.Replicas != nil {
+ in, out := in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Replicas = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ReplicationControllerStatus(in ReplicationControllerStatus, out *ReplicationControllerStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func DeepCopy_v1_ResourceFieldSelector(in ResourceFieldSelector, out *ResourceFieldSelector, c *conversion.Cloner) error {
+ out.ContainerName = in.ContainerName
+ out.Resource = in.Resource
+ out.Divisor = in.Divisor.DeepCopy()
+ return nil
+}
+
+func DeepCopy_v1_ResourceQuota(in ResourceQuota, out *ResourceQuota, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1_ResourceQuotaList(in ResourceQuotaList, out *ResourceQuotaList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ResourceQuotaSpec(in ResourceQuotaSpec, out *ResourceQuotaSpec, c *conversion.Cloner) error {
+ if in.Hard != nil {
+ in, out := in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Hard = nil
+ }
+ if in.Scopes != nil {
+ in, out := in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Scopes = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ResourceQuotaStatus(in ResourceQuotaStatus, out *ResourceQuotaStatus, c *conversion.Cloner) error {
+ if in.Hard != nil {
+ in, out := in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Hard = nil
+ }
+ if in.Used != nil {
+ in, out := in.Used, &out.Used
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Used = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ResourceRequirements(in ResourceRequirements, out *ResourceRequirements, c *conversion.Cloner) error {
+ if in.Limits != nil {
+ in, out := in.Limits, &out.Limits
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Limits = nil
+ }
+ if in.Requests != nil {
+ in, out := in.Requests, &out.Requests
+ *out = make(ResourceList)
+ for key, val := range in {
+ (*out)[key] = val.DeepCopy()
+ }
+ } else {
+ out.Requests = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_SELinuxOptions(in SELinuxOptions, out *SELinuxOptions, c *conversion.Cloner) error {
+ out.User = in.User
+ out.Role = in.Role
+ out.Type = in.Type
+ out.Level = in.Level
+ return nil
+}
+
+func DeepCopy_v1_Secret(in Secret, out *Secret, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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)
+ }
+ }
+ } else {
+ out.Data = nil
+ }
+ if in.StringData != nil {
+ in, out := in.StringData, &out.StringData
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.StringData = nil
+ }
+ out.Type = in.Type
+ return nil
+}
+
+func DeepCopy_v1_SecretKeySelector(in SecretKeySelector, out *SecretKeySelector, c *conversion.Cloner) error {
+ out.LocalObjectReference = in.LocalObjectReference
+ out.Key = in.Key
+ return nil
+}
+
+func DeepCopy_v1_SecretList(in SecretList, out *SecretList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_Secret(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_SecretVolumeSource(in SecretVolumeSource, out *SecretVolumeSource, c *conversion.Cloner) error {
+ out.SecretName = in.SecretName
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]KeyToPath, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_SecurityContext(in SecurityContext, out *SecurityContext, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.Capabilities = nil
+ }
+ if in.Privileged != nil {
+ in, out := in.Privileged, &out.Privileged
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.Privileged = nil
+ }
+ if in.SELinuxOptions != nil {
+ in, out := in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = *in
+ } else {
+ out.SELinuxOptions = nil
+ }
+ if in.RunAsUser != nil {
+ in, out := in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.RunAsUser = nil
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.RunAsNonRoot = nil
+ }
+ if in.ReadOnlyRootFilesystem != nil {
+ in, out := in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.ReadOnlyRootFilesystem = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_SerializedReference(in SerializedReference, out *SerializedReference, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Reference = in.Reference
+ return nil
+}
+
+func DeepCopy_v1_Service(in Service, out *Service, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1_ServiceAccount(in ServiceAccount, out *ServiceAccount, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Secrets != nil {
+ in, out := in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Secrets = nil
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.ImagePullSecrets = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ServiceAccountList(in ServiceAccountList, out *ServiceAccountList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ServiceList(in ServiceList, out *ServiceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_Service(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ServicePort(in ServicePort, out *ServicePort, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.Protocol = in.Protocol
+ out.Port = in.Port
+ out.TargetPort = in.TargetPort
+ out.NodePort = in.NodePort
+ return nil
+}
+
+func DeepCopy_v1_ServiceProxyOptions(in ServiceProxyOptions, out *ServiceProxyOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Path = in.Path
+ return nil
+}
+
+func DeepCopy_v1_ServiceSpec(in ServiceSpec, out *ServiceSpec, c *conversion.Cloner) error {
+ if in.Ports != nil {
+ in, out := in.Ports, &out.Ports
+ *out = make([]ServicePort, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ports = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.ClusterIP = in.ClusterIP
+ out.Type = in.Type
+ if in.ExternalIPs != nil {
+ in, out := in.ExternalIPs, &out.ExternalIPs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.ExternalIPs = nil
+ }
+ if in.DeprecatedPublicIPs != nil {
+ in, out := in.DeprecatedPublicIPs, &out.DeprecatedPublicIPs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.DeprecatedPublicIPs = nil
+ }
+ out.SessionAffinity = in.SessionAffinity
+ out.LoadBalancerIP = in.LoadBalancerIP
+ if in.LoadBalancerSourceRanges != nil {
+ in, out := in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.LoadBalancerSourceRanges = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_ServiceStatus(in ServiceStatus, out *ServiceStatus, c *conversion.Cloner) error {
+ if err := DeepCopy_v1_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_TCPSocketAction(in TCPSocketAction, out *TCPSocketAction, c *conversion.Cloner) error {
+ out.Port = in.Port
+ return nil
+}
+
+func DeepCopy_v1_Taint(in Taint, out *Taint, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = in.Effect
+ return nil
+}
+
+func DeepCopy_v1_Toleration(in Toleration, out *Toleration, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ out.Value = in.Value
+ out.Effect = in.Effect
+ return nil
+}
+
+func DeepCopy_v1_Volume(in Volume, out *Volume, c *conversion.Cloner) error {
+ out.Name = in.Name
+ if err := DeepCopy_v1_VolumeSource(in.VolumeSource, &out.VolumeSource, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_VolumeMount(in VolumeMount, out *VolumeMount, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.ReadOnly = in.ReadOnly
+ out.MountPath = in.MountPath
+ out.SubPath = in.SubPath
+ return nil
+}
+
+func DeepCopy_v1_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion.Cloner) error {
+ if in.HostPath != nil {
+ in, out := in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = *in
+ } else {
+ out.HostPath = nil
+ }
+ if in.EmptyDir != nil {
+ in, out := in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ **out = *in
+ } else {
+ out.EmptyDir = nil
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = *in
+ } else {
+ out.GCEPersistentDisk = nil
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = *in
+ } else {
+ out.AWSElasticBlockStore = nil
+ }
+ if in.GitRepo != nil {
+ in, out := in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ **out = *in
+ } else {
+ out.GitRepo = nil
+ }
+ 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
+ }
+ } else {
+ out.Secret = nil
+ }
+ if in.NFS != nil {
+ in, out := in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = *in
+ } else {
+ out.NFS = nil
+ }
+ if in.ISCSI != nil {
+ in, out := in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ **out = *in
+ } else {
+ out.ISCSI = nil
+ }
+ if in.Glusterfs != nil {
+ in, out := in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = *in
+ } else {
+ out.Glusterfs = nil
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ **out = *in
+ } else {
+ out.PersistentVolumeClaim = nil
+ }
+ 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
+ }
+ } else {
+ out.RBD = nil
+ }
+ 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
+ }
+ } else {
+ out.FlexVolume = nil
+ }
+ if in.Cinder != nil {
+ in, out := in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = *in
+ } else {
+ out.Cinder = nil
+ }
+ 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
+ }
+ } else {
+ out.CephFS = nil
+ }
+ if in.Flocker != nil {
+ in, out := in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = *in
+ } else {
+ out.Flocker = nil
+ }
+ 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
+ }
+ } else {
+ out.DownwardAPI = nil
+ }
+ 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
+ }
+ } else {
+ out.FC = nil
+ }
+ if in.AzureFile != nil {
+ in, out := in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = *in
+ } else {
+ out.AzureFile = nil
+ }
+ 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
+ }
+ } else {
+ out.ConfigMap = nil
+ }
+ if in.VsphereVolume != nil {
+ in, out := in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = *in
+ } else {
+ out.VsphereVolume = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_VsphereVirtualDiskVolumeSource(in VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, c *conversion.Cloner) error {
+ out.VolumePath = in.VolumePath
+ out.FSType = in.FSType
+ return nil
+}
+
+func DeepCopy_v1_WeightedPodAffinityTerm(in WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, c *conversion.Cloner) error {
+ out.Weight = in.Weight
+ if err := DeepCopy_v1_PodAffinityTerm(in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
new file mode 100644
index 0000000..5d6323f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
@@ -0,0 +1,301 @@
+/*
+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/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util"
+ "k8s.io/kubernetes/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/util/parsers"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_PodExecOptions,
+ SetDefaults_PodAttachOptions,
+ SetDefaults_ReplicationController,
+ SetDefaults_Volume,
+ SetDefaults_ContainerPort,
+ SetDefaults_Container,
+ SetDefaults_ServiceSpec,
+ SetDefaults_Pod,
+ SetDefaults_PodSpec,
+ SetDefaults_Probe,
+ SetDefaults_Secret,
+ SetDefaults_PersistentVolume,
+ SetDefaults_PersistentVolumeClaim,
+ SetDefaults_ISCSIVolumeSource,
+ SetDefaults_Endpoints,
+ SetDefaults_HTTPGetAction,
+ SetDefaults_NamespaceStatus,
+ SetDefaults_Node,
+ SetDefaults_NodeStatus,
+ SetDefaults_ObjectFieldSelector,
+ SetDefaults_LimitRangeItem,
+ SetDefaults_ConfigMap,
+ SetDefaults_RBDVolumeSource,
+ )
+}
+
+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
+ }
+}
+func SetDefaults_ServiceSpec(obj *ServiceSpec) {
+ if obj.SessionAffinity == "" {
+ obj.SessionAffinity = ServiceAffinityNone
+ }
+ if obj.Type == "" {
+ obj.Type = ServiceTypeClusterIP
+ }
+ for i := range obj.Ports {
+ sp := &obj.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))
+ }
+ }
+}
+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())
+ }
+ }
+ }
+ }
+}
+func SetDefaults_PodSpec(obj *PodSpec) {
+ if obj.DNSPolicy == "" {
+ obj.DNSPolicy = DNSClusterFirst
+ }
+ if obj.RestartPolicy == "" {
+ obj.RestartPolicy = RestartPolicyAlways
+ }
+ if obj.HostNetwork {
+ defaultHostNetworkPorts(&obj.Containers)
+ }
+ if obj.SecurityContext == nil {
+ obj.SecurityContext = &PodSecurityContext{}
+ }
+ if obj.TerminationGracePeriodSeconds == nil {
+ period := int64(DefaultTerminationGracePeriodSeconds)
+ obj.TerminationGracePeriodSeconds = &period
+ }
+}
+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_Secret(obj *Secret) {
+ if obj.Type == "" {
+ obj.Type = SecretTypeOpaque
+ }
+}
+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_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"
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go
new file mode 100644
index 0000000..8849ee1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/api
+
+// Package v1 is the v1 version of the API.
+package v1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go
new file mode 100644
index 0000000..16ac125
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go
@@ -0,0 +1,34797 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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
+ AzureFileVolumeSource
+ Binding
+ Capabilities
+ CephFSVolumeSource
+ CinderVolumeSource
+ ComponentCondition
+ ComponentStatus
+ ComponentStatusList
+ ConfigMap
+ ConfigMapKeySelector
+ ConfigMapList
+ ConfigMapVolumeSource
+ Container
+ ContainerImage
+ ContainerPort
+ ContainerState
+ ContainerStateRunning
+ ContainerStateTerminated
+ ContainerStateWaiting
+ ContainerStatus
+ DaemonEndpoint
+ DeleteOptions
+ DownwardAPIVolumeFile
+ DownwardAPIVolumeSource
+ EmptyDirVolumeSource
+ EndpointAddress
+ EndpointPort
+ EndpointSubset
+ Endpoints
+ EndpointsList
+ EnvVar
+ EnvVarSource
+ Event
+ EventList
+ EventSource
+ ExecAction
+ ExportOptions
+ FCVolumeSource
+ FlexVolumeSource
+ FlockerVolumeSource
+ GCEPersistentDiskVolumeSource
+ GitRepoVolumeSource
+ GlusterfsVolumeSource
+ HTTPGetAction
+ HTTPHeader
+ Handler
+ HostPathVolumeSource
+ ISCSIVolumeSource
+ KeyToPath
+ Lifecycle
+ LimitRange
+ LimitRangeItem
+ LimitRangeList
+ LimitRangeSpec
+ List
+ ListOptions
+ LoadBalancerIngress
+ LoadBalancerStatus
+ LocalObjectReference
+ NFSVolumeSource
+ Namespace
+ NamespaceList
+ NamespaceSpec
+ NamespaceStatus
+ Node
+ NodeAddress
+ NodeAffinity
+ NodeCondition
+ NodeDaemonEndpoints
+ NodeList
+ NodeProxyOptions
+ NodeSelector
+ NodeSelectorRequirement
+ NodeSelectorTerm
+ NodeSpec
+ NodeStatus
+ NodeSystemInfo
+ ObjectFieldSelector
+ ObjectMeta
+ ObjectReference
+ OwnerReference
+ PersistentVolume
+ PersistentVolumeClaim
+ PersistentVolumeClaimList
+ PersistentVolumeClaimSpec
+ PersistentVolumeClaimStatus
+ PersistentVolumeClaimVolumeSource
+ PersistentVolumeList
+ PersistentVolumeSource
+ PersistentVolumeSpec
+ PersistentVolumeStatus
+ Pod
+ PodAffinity
+ PodAffinityTerm
+ PodAntiAffinity
+ PodAttachOptions
+ PodCondition
+ PodExecOptions
+ PodList
+ PodLogOptions
+ PodProxyOptions
+ PodSecurityContext
+ PodSpec
+ PodStatus
+ PodStatusResult
+ PodTemplate
+ PodTemplateList
+ PodTemplateSpec
+ Preconditions
+ PreferredSchedulingTerm
+ Probe
+ RBDVolumeSource
+ RangeAllocation
+ ReplicationController
+ ReplicationControllerList
+ ReplicationControllerSpec
+ ReplicationControllerStatus
+ ResourceFieldSelector
+ ResourceQuota
+ ResourceQuotaList
+ ResourceQuotaSpec
+ ResourceQuotaStatus
+ ResourceRequirements
+ SELinuxOptions
+ Secret
+ SecretKeySelector
+ SecretList
+ SecretVolumeSource
+ SecurityContext
+ SerializedReference
+ Service
+ ServiceAccount
+ ServiceAccountList
+ ServiceList
+ ServicePort
+ ServiceProxyOptions
+ ServiceSpec
+ ServiceStatus
+ TCPSocketAction
+ Taint
+ Toleration
+ Volume
+ VolumeMount
+ VolumeSource
+ VsphereVirtualDiskVolumeSource
+ WeightedPodAffinityTerm
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_resource "k8s.io/kubernetes/pkg/api/resource"
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+import k8s_io_kubernetes_pkg_runtime "k8s.io/kubernetes/pkg/runtime"
+
+import k8s_io_kubernetes_pkg_types "k8s.io/kubernetes/pkg/types"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} }
+func (m *AWSElasticBlockStoreVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {}
+
+func (m *Affinity) Reset() { *m = Affinity{} }
+func (m *Affinity) String() string { return proto.CompactTextString(m) }
+func (*Affinity) ProtoMessage() {}
+
+func (m *AttachedVolume) Reset() { *m = AttachedVolume{} }
+func (m *AttachedVolume) String() string { return proto.CompactTextString(m) }
+func (*AttachedVolume) ProtoMessage() {}
+
+func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} }
+func (m *AzureFileVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*AzureFileVolumeSource) ProtoMessage() {}
+
+func (m *Binding) Reset() { *m = Binding{} }
+func (m *Binding) String() string { return proto.CompactTextString(m) }
+func (*Binding) ProtoMessage() {}
+
+func (m *Capabilities) Reset() { *m = Capabilities{} }
+func (m *Capabilities) String() string { return proto.CompactTextString(m) }
+func (*Capabilities) ProtoMessage() {}
+
+func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} }
+func (m *CephFSVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*CephFSVolumeSource) ProtoMessage() {}
+
+func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} }
+func (m *CinderVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*CinderVolumeSource) ProtoMessage() {}
+
+func (m *ComponentCondition) Reset() { *m = ComponentCondition{} }
+func (m *ComponentCondition) String() string { return proto.CompactTextString(m) }
+func (*ComponentCondition) ProtoMessage() {}
+
+func (m *ComponentStatus) Reset() { *m = ComponentStatus{} }
+func (m *ComponentStatus) String() string { return proto.CompactTextString(m) }
+func (*ComponentStatus) ProtoMessage() {}
+
+func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} }
+func (m *ComponentStatusList) String() string { return proto.CompactTextString(m) }
+func (*ComponentStatusList) ProtoMessage() {}
+
+func (m *ConfigMap) Reset() { *m = ConfigMap{} }
+func (m *ConfigMap) String() string { return proto.CompactTextString(m) }
+func (*ConfigMap) ProtoMessage() {}
+
+func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} }
+func (m *ConfigMapKeySelector) String() string { return proto.CompactTextString(m) }
+func (*ConfigMapKeySelector) ProtoMessage() {}
+
+func (m *ConfigMapList) Reset() { *m = ConfigMapList{} }
+func (m *ConfigMapList) String() string { return proto.CompactTextString(m) }
+func (*ConfigMapList) ProtoMessage() {}
+
+func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} }
+func (m *ConfigMapVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*ConfigMapVolumeSource) ProtoMessage() {}
+
+func (m *Container) Reset() { *m = Container{} }
+func (m *Container) String() string { return proto.CompactTextString(m) }
+func (*Container) ProtoMessage() {}
+
+func (m *ContainerImage) Reset() { *m = ContainerImage{} }
+func (m *ContainerImage) String() string { return proto.CompactTextString(m) }
+func (*ContainerImage) ProtoMessage() {}
+
+func (m *ContainerPort) Reset() { *m = ContainerPort{} }
+func (m *ContainerPort) String() string { return proto.CompactTextString(m) }
+func (*ContainerPort) ProtoMessage() {}
+
+func (m *ContainerState) Reset() { *m = ContainerState{} }
+func (m *ContainerState) String() string { return proto.CompactTextString(m) }
+func (*ContainerState) ProtoMessage() {}
+
+func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} }
+func (m *ContainerStateRunning) String() string { return proto.CompactTextString(m) }
+func (*ContainerStateRunning) ProtoMessage() {}
+
+func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} }
+func (m *ContainerStateTerminated) String() string { return proto.CompactTextString(m) }
+func (*ContainerStateTerminated) ProtoMessage() {}
+
+func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} }
+func (m *ContainerStateWaiting) String() string { return proto.CompactTextString(m) }
+func (*ContainerStateWaiting) ProtoMessage() {}
+
+func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
+func (m *ContainerStatus) String() string { return proto.CompactTextString(m) }
+func (*ContainerStatus) ProtoMessage() {}
+
+func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} }
+func (m *DaemonEndpoint) String() string { return proto.CompactTextString(m) }
+func (*DaemonEndpoint) ProtoMessage() {}
+
+func (m *DeleteOptions) Reset() { *m = DeleteOptions{} }
+func (m *DeleteOptions) String() string { return proto.CompactTextString(m) }
+func (*DeleteOptions) ProtoMessage() {}
+
+func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} }
+func (m *DownwardAPIVolumeFile) String() string { return proto.CompactTextString(m) }
+func (*DownwardAPIVolumeFile) ProtoMessage() {}
+
+func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} }
+func (m *DownwardAPIVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*DownwardAPIVolumeSource) ProtoMessage() {}
+
+func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} }
+func (m *EmptyDirVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*EmptyDirVolumeSource) ProtoMessage() {}
+
+func (m *EndpointAddress) Reset() { *m = EndpointAddress{} }
+func (m *EndpointAddress) String() string { return proto.CompactTextString(m) }
+func (*EndpointAddress) ProtoMessage() {}
+
+func (m *EndpointPort) Reset() { *m = EndpointPort{} }
+func (m *EndpointPort) String() string { return proto.CompactTextString(m) }
+func (*EndpointPort) ProtoMessage() {}
+
+func (m *EndpointSubset) Reset() { *m = EndpointSubset{} }
+func (m *EndpointSubset) String() string { return proto.CompactTextString(m) }
+func (*EndpointSubset) ProtoMessage() {}
+
+func (m *Endpoints) Reset() { *m = Endpoints{} }
+func (m *Endpoints) String() string { return proto.CompactTextString(m) }
+func (*Endpoints) ProtoMessage() {}
+
+func (m *EndpointsList) Reset() { *m = EndpointsList{} }
+func (m *EndpointsList) String() string { return proto.CompactTextString(m) }
+func (*EndpointsList) ProtoMessage() {}
+
+func (m *EnvVar) Reset() { *m = EnvVar{} }
+func (m *EnvVar) String() string { return proto.CompactTextString(m) }
+func (*EnvVar) ProtoMessage() {}
+
+func (m *EnvVarSource) Reset() { *m = EnvVarSource{} }
+func (m *EnvVarSource) String() string { return proto.CompactTextString(m) }
+func (*EnvVarSource) ProtoMessage() {}
+
+func (m *Event) Reset() { *m = Event{} }
+func (m *Event) String() string { return proto.CompactTextString(m) }
+func (*Event) ProtoMessage() {}
+
+func (m *EventList) Reset() { *m = EventList{} }
+func (m *EventList) String() string { return proto.CompactTextString(m) }
+func (*EventList) ProtoMessage() {}
+
+func (m *EventSource) Reset() { *m = EventSource{} }
+func (m *EventSource) String() string { return proto.CompactTextString(m) }
+func (*EventSource) ProtoMessage() {}
+
+func (m *ExecAction) Reset() { *m = ExecAction{} }
+func (m *ExecAction) String() string { return proto.CompactTextString(m) }
+func (*ExecAction) ProtoMessage() {}
+
+func (m *ExportOptions) Reset() { *m = ExportOptions{} }
+func (m *ExportOptions) String() string { return proto.CompactTextString(m) }
+func (*ExportOptions) ProtoMessage() {}
+
+func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} }
+func (m *FCVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*FCVolumeSource) ProtoMessage() {}
+
+func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} }
+func (m *FlexVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*FlexVolumeSource) ProtoMessage() {}
+
+func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} }
+func (m *FlockerVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*FlockerVolumeSource) ProtoMessage() {}
+
+func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} }
+func (m *GCEPersistentDiskVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*GCEPersistentDiskVolumeSource) ProtoMessage() {}
+
+func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} }
+func (m *GitRepoVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*GitRepoVolumeSource) ProtoMessage() {}
+
+func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} }
+func (m *GlusterfsVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*GlusterfsVolumeSource) ProtoMessage() {}
+
+func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} }
+func (m *HTTPGetAction) String() string { return proto.CompactTextString(m) }
+func (*HTTPGetAction) ProtoMessage() {}
+
+func (m *HTTPHeader) Reset() { *m = HTTPHeader{} }
+func (m *HTTPHeader) String() string { return proto.CompactTextString(m) }
+func (*HTTPHeader) ProtoMessage() {}
+
+func (m *Handler) Reset() { *m = Handler{} }
+func (m *Handler) String() string { return proto.CompactTextString(m) }
+func (*Handler) ProtoMessage() {}
+
+func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} }
+func (m *HostPathVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*HostPathVolumeSource) ProtoMessage() {}
+
+func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} }
+func (m *ISCSIVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*ISCSIVolumeSource) ProtoMessage() {}
+
+func (m *KeyToPath) Reset() { *m = KeyToPath{} }
+func (m *KeyToPath) String() string { return proto.CompactTextString(m) }
+func (*KeyToPath) ProtoMessage() {}
+
+func (m *Lifecycle) Reset() { *m = Lifecycle{} }
+func (m *Lifecycle) String() string { return proto.CompactTextString(m) }
+func (*Lifecycle) ProtoMessage() {}
+
+func (m *LimitRange) Reset() { *m = LimitRange{} }
+func (m *LimitRange) String() string { return proto.CompactTextString(m) }
+func (*LimitRange) ProtoMessage() {}
+
+func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} }
+func (m *LimitRangeItem) String() string { return proto.CompactTextString(m) }
+func (*LimitRangeItem) ProtoMessage() {}
+
+func (m *LimitRangeList) Reset() { *m = LimitRangeList{} }
+func (m *LimitRangeList) String() string { return proto.CompactTextString(m) }
+func (*LimitRangeList) ProtoMessage() {}
+
+func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} }
+func (m *LimitRangeSpec) String() string { return proto.CompactTextString(m) }
+func (*LimitRangeSpec) ProtoMessage() {}
+
+func (m *List) Reset() { *m = List{} }
+func (m *List) String() string { return proto.CompactTextString(m) }
+func (*List) ProtoMessage() {}
+
+func (m *ListOptions) Reset() { *m = ListOptions{} }
+func (m *ListOptions) String() string { return proto.CompactTextString(m) }
+func (*ListOptions) ProtoMessage() {}
+
+func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} }
+func (m *LoadBalancerIngress) String() string { return proto.CompactTextString(m) }
+func (*LoadBalancerIngress) ProtoMessage() {}
+
+func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} }
+func (m *LoadBalancerStatus) String() string { return proto.CompactTextString(m) }
+func (*LoadBalancerStatus) ProtoMessage() {}
+
+func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} }
+func (m *LocalObjectReference) String() string { return proto.CompactTextString(m) }
+func (*LocalObjectReference) ProtoMessage() {}
+
+func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} }
+func (m *NFSVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*NFSVolumeSource) ProtoMessage() {}
+
+func (m *Namespace) Reset() { *m = Namespace{} }
+func (m *Namespace) String() string { return proto.CompactTextString(m) }
+func (*Namespace) ProtoMessage() {}
+
+func (m *NamespaceList) Reset() { *m = NamespaceList{} }
+func (m *NamespaceList) String() string { return proto.CompactTextString(m) }
+func (*NamespaceList) ProtoMessage() {}
+
+func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} }
+func (m *NamespaceSpec) String() string { return proto.CompactTextString(m) }
+func (*NamespaceSpec) ProtoMessage() {}
+
+func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} }
+func (m *NamespaceStatus) String() string { return proto.CompactTextString(m) }
+func (*NamespaceStatus) ProtoMessage() {}
+
+func (m *Node) Reset() { *m = Node{} }
+func (m *Node) String() string { return proto.CompactTextString(m) }
+func (*Node) ProtoMessage() {}
+
+func (m *NodeAddress) Reset() { *m = NodeAddress{} }
+func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
+func (*NodeAddress) ProtoMessage() {}
+
+func (m *NodeAffinity) Reset() { *m = NodeAffinity{} }
+func (m *NodeAffinity) String() string { return proto.CompactTextString(m) }
+func (*NodeAffinity) ProtoMessage() {}
+
+func (m *NodeCondition) Reset() { *m = NodeCondition{} }
+func (m *NodeCondition) String() string { return proto.CompactTextString(m) }
+func (*NodeCondition) ProtoMessage() {}
+
+func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} }
+func (m *NodeDaemonEndpoints) String() string { return proto.CompactTextString(m) }
+func (*NodeDaemonEndpoints) ProtoMessage() {}
+
+func (m *NodeList) Reset() { *m = NodeList{} }
+func (m *NodeList) String() string { return proto.CompactTextString(m) }
+func (*NodeList) ProtoMessage() {}
+
+func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} }
+func (m *NodeProxyOptions) String() string { return proto.CompactTextString(m) }
+func (*NodeProxyOptions) ProtoMessage() {}
+
+func (m *NodeSelector) Reset() { *m = NodeSelector{} }
+func (m *NodeSelector) String() string { return proto.CompactTextString(m) }
+func (*NodeSelector) ProtoMessage() {}
+
+func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} }
+func (m *NodeSelectorRequirement) String() string { return proto.CompactTextString(m) }
+func (*NodeSelectorRequirement) ProtoMessage() {}
+
+func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} }
+func (m *NodeSelectorTerm) String() string { return proto.CompactTextString(m) }
+func (*NodeSelectorTerm) ProtoMessage() {}
+
+func (m *NodeSpec) Reset() { *m = NodeSpec{} }
+func (m *NodeSpec) String() string { return proto.CompactTextString(m) }
+func (*NodeSpec) ProtoMessage() {}
+
+func (m *NodeStatus) Reset() { *m = NodeStatus{} }
+func (m *NodeStatus) String() string { return proto.CompactTextString(m) }
+func (*NodeStatus) ProtoMessage() {}
+
+func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} }
+func (m *NodeSystemInfo) String() string { return proto.CompactTextString(m) }
+func (*NodeSystemInfo) ProtoMessage() {}
+
+func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} }
+func (m *ObjectFieldSelector) String() string { return proto.CompactTextString(m) }
+func (*ObjectFieldSelector) ProtoMessage() {}
+
+func (m *ObjectMeta) Reset() { *m = ObjectMeta{} }
+func (m *ObjectMeta) String() string { return proto.CompactTextString(m) }
+func (*ObjectMeta) ProtoMessage() {}
+
+func (m *ObjectReference) Reset() { *m = ObjectReference{} }
+func (m *ObjectReference) String() string { return proto.CompactTextString(m) }
+func (*ObjectReference) ProtoMessage() {}
+
+func (m *OwnerReference) Reset() { *m = OwnerReference{} }
+func (m *OwnerReference) String() string { return proto.CompactTextString(m) }
+func (*OwnerReference) ProtoMessage() {}
+
+func (m *PersistentVolume) Reset() { *m = PersistentVolume{} }
+func (m *PersistentVolume) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolume) ProtoMessage() {}
+
+func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} }
+func (m *PersistentVolumeClaim) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeClaim) ProtoMessage() {}
+
+func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} }
+func (m *PersistentVolumeClaimList) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeClaimList) ProtoMessage() {}
+
+func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} }
+func (m *PersistentVolumeClaimSpec) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeClaimSpec) ProtoMessage() {}
+
+func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} }
+func (m *PersistentVolumeClaimStatus) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeClaimStatus) ProtoMessage() {}
+
+func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} }
+func (m *PersistentVolumeClaimVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {}
+
+func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} }
+func (m *PersistentVolumeList) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeList) ProtoMessage() {}
+
+func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} }
+func (m *PersistentVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeSource) ProtoMessage() {}
+
+func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} }
+func (m *PersistentVolumeSpec) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeSpec) ProtoMessage() {}
+
+func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} }
+func (m *PersistentVolumeStatus) String() string { return proto.CompactTextString(m) }
+func (*PersistentVolumeStatus) ProtoMessage() {}
+
+func (m *Pod) Reset() { *m = Pod{} }
+func (m *Pod) String() string { return proto.CompactTextString(m) }
+func (*Pod) ProtoMessage() {}
+
+func (m *PodAffinity) Reset() { *m = PodAffinity{} }
+func (m *PodAffinity) String() string { return proto.CompactTextString(m) }
+func (*PodAffinity) ProtoMessage() {}
+
+func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} }
+func (m *PodAffinityTerm) String() string { return proto.CompactTextString(m) }
+func (*PodAffinityTerm) ProtoMessage() {}
+
+func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} }
+func (m *PodAntiAffinity) String() string { return proto.CompactTextString(m) }
+func (*PodAntiAffinity) ProtoMessage() {}
+
+func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} }
+func (m *PodAttachOptions) String() string { return proto.CompactTextString(m) }
+func (*PodAttachOptions) ProtoMessage() {}
+
+func (m *PodCondition) Reset() { *m = PodCondition{} }
+func (m *PodCondition) String() string { return proto.CompactTextString(m) }
+func (*PodCondition) ProtoMessage() {}
+
+func (m *PodExecOptions) Reset() { *m = PodExecOptions{} }
+func (m *PodExecOptions) String() string { return proto.CompactTextString(m) }
+func (*PodExecOptions) ProtoMessage() {}
+
+func (m *PodList) Reset() { *m = PodList{} }
+func (m *PodList) String() string { return proto.CompactTextString(m) }
+func (*PodList) ProtoMessage() {}
+
+func (m *PodLogOptions) Reset() { *m = PodLogOptions{} }
+func (m *PodLogOptions) String() string { return proto.CompactTextString(m) }
+func (*PodLogOptions) ProtoMessage() {}
+
+func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} }
+func (m *PodProxyOptions) String() string { return proto.CompactTextString(m) }
+func (*PodProxyOptions) ProtoMessage() {}
+
+func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} }
+func (m *PodSecurityContext) String() string { return proto.CompactTextString(m) }
+func (*PodSecurityContext) ProtoMessage() {}
+
+func (m *PodSpec) Reset() { *m = PodSpec{} }
+func (m *PodSpec) String() string { return proto.CompactTextString(m) }
+func (*PodSpec) ProtoMessage() {}
+
+func (m *PodStatus) Reset() { *m = PodStatus{} }
+func (m *PodStatus) String() string { return proto.CompactTextString(m) }
+func (*PodStatus) ProtoMessage() {}
+
+func (m *PodStatusResult) Reset() { *m = PodStatusResult{} }
+func (m *PodStatusResult) String() string { return proto.CompactTextString(m) }
+func (*PodStatusResult) ProtoMessage() {}
+
+func (m *PodTemplate) Reset() { *m = PodTemplate{} }
+func (m *PodTemplate) String() string { return proto.CompactTextString(m) }
+func (*PodTemplate) ProtoMessage() {}
+
+func (m *PodTemplateList) Reset() { *m = PodTemplateList{} }
+func (m *PodTemplateList) String() string { return proto.CompactTextString(m) }
+func (*PodTemplateList) ProtoMessage() {}
+
+func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} }
+func (m *PodTemplateSpec) String() string { return proto.CompactTextString(m) }
+func (*PodTemplateSpec) ProtoMessage() {}
+
+func (m *Preconditions) Reset() { *m = Preconditions{} }
+func (m *Preconditions) String() string { return proto.CompactTextString(m) }
+func (*Preconditions) ProtoMessage() {}
+
+func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} }
+func (m *PreferredSchedulingTerm) String() string { return proto.CompactTextString(m) }
+func (*PreferredSchedulingTerm) ProtoMessage() {}
+
+func (m *Probe) Reset() { *m = Probe{} }
+func (m *Probe) String() string { return proto.CompactTextString(m) }
+func (*Probe) ProtoMessage() {}
+
+func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} }
+func (m *RBDVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*RBDVolumeSource) ProtoMessage() {}
+
+func (m *RangeAllocation) Reset() { *m = RangeAllocation{} }
+func (m *RangeAllocation) String() string { return proto.CompactTextString(m) }
+func (*RangeAllocation) ProtoMessage() {}
+
+func (m *ReplicationController) Reset() { *m = ReplicationController{} }
+func (m *ReplicationController) String() string { return proto.CompactTextString(m) }
+func (*ReplicationController) ProtoMessage() {}
+
+func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} }
+func (m *ReplicationControllerList) String() string { return proto.CompactTextString(m) }
+func (*ReplicationControllerList) ProtoMessage() {}
+
+func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} }
+func (m *ReplicationControllerSpec) String() string { return proto.CompactTextString(m) }
+func (*ReplicationControllerSpec) ProtoMessage() {}
+
+func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} }
+func (m *ReplicationControllerStatus) String() string { return proto.CompactTextString(m) }
+func (*ReplicationControllerStatus) ProtoMessage() {}
+
+func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} }
+func (m *ResourceFieldSelector) String() string { return proto.CompactTextString(m) }
+func (*ResourceFieldSelector) ProtoMessage() {}
+
+func (m *ResourceQuota) Reset() { *m = ResourceQuota{} }
+func (m *ResourceQuota) String() string { return proto.CompactTextString(m) }
+func (*ResourceQuota) ProtoMessage() {}
+
+func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} }
+func (m *ResourceQuotaList) String() string { return proto.CompactTextString(m) }
+func (*ResourceQuotaList) ProtoMessage() {}
+
+func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} }
+func (m *ResourceQuotaSpec) String() string { return proto.CompactTextString(m) }
+func (*ResourceQuotaSpec) ProtoMessage() {}
+
+func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} }
+func (m *ResourceQuotaStatus) String() string { return proto.CompactTextString(m) }
+func (*ResourceQuotaStatus) ProtoMessage() {}
+
+func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
+func (m *ResourceRequirements) String() string { return proto.CompactTextString(m) }
+func (*ResourceRequirements) ProtoMessage() {}
+
+func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} }
+func (m *SELinuxOptions) String() string { return proto.CompactTextString(m) }
+func (*SELinuxOptions) ProtoMessage() {}
+
+func (m *Secret) Reset() { *m = Secret{} }
+func (m *Secret) String() string { return proto.CompactTextString(m) }
+func (*Secret) ProtoMessage() {}
+
+func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} }
+func (m *SecretKeySelector) String() string { return proto.CompactTextString(m) }
+func (*SecretKeySelector) ProtoMessage() {}
+
+func (m *SecretList) Reset() { *m = SecretList{} }
+func (m *SecretList) String() string { return proto.CompactTextString(m) }
+func (*SecretList) ProtoMessage() {}
+
+func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} }
+func (m *SecretVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*SecretVolumeSource) ProtoMessage() {}
+
+func (m *SecurityContext) Reset() { *m = SecurityContext{} }
+func (m *SecurityContext) String() string { return proto.CompactTextString(m) }
+func (*SecurityContext) ProtoMessage() {}
+
+func (m *SerializedReference) Reset() { *m = SerializedReference{} }
+func (m *SerializedReference) String() string { return proto.CompactTextString(m) }
+func (*SerializedReference) ProtoMessage() {}
+
+func (m *Service) Reset() { *m = Service{} }
+func (m *Service) String() string { return proto.CompactTextString(m) }
+func (*Service) ProtoMessage() {}
+
+func (m *ServiceAccount) Reset() { *m = ServiceAccount{} }
+func (m *ServiceAccount) String() string { return proto.CompactTextString(m) }
+func (*ServiceAccount) ProtoMessage() {}
+
+func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} }
+func (m *ServiceAccountList) String() string { return proto.CompactTextString(m) }
+func (*ServiceAccountList) ProtoMessage() {}
+
+func (m *ServiceList) Reset() { *m = ServiceList{} }
+func (m *ServiceList) String() string { return proto.CompactTextString(m) }
+func (*ServiceList) ProtoMessage() {}
+
+func (m *ServicePort) Reset() { *m = ServicePort{} }
+func (m *ServicePort) String() string { return proto.CompactTextString(m) }
+func (*ServicePort) ProtoMessage() {}
+
+func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} }
+func (m *ServiceProxyOptions) String() string { return proto.CompactTextString(m) }
+func (*ServiceProxyOptions) ProtoMessage() {}
+
+func (m *ServiceSpec) Reset() { *m = ServiceSpec{} }
+func (m *ServiceSpec) String() string { return proto.CompactTextString(m) }
+func (*ServiceSpec) ProtoMessage() {}
+
+func (m *ServiceStatus) Reset() { *m = ServiceStatus{} }
+func (m *ServiceStatus) String() string { return proto.CompactTextString(m) }
+func (*ServiceStatus) ProtoMessage() {}
+
+func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} }
+func (m *TCPSocketAction) String() string { return proto.CompactTextString(m) }
+func (*TCPSocketAction) ProtoMessage() {}
+
+func (m *Taint) Reset() { *m = Taint{} }
+func (m *Taint) String() string { return proto.CompactTextString(m) }
+func (*Taint) ProtoMessage() {}
+
+func (m *Toleration) Reset() { *m = Toleration{} }
+func (m *Toleration) String() string { return proto.CompactTextString(m) }
+func (*Toleration) ProtoMessage() {}
+
+func (m *Volume) Reset() { *m = Volume{} }
+func (m *Volume) String() string { return proto.CompactTextString(m) }
+func (*Volume) ProtoMessage() {}
+
+func (m *VolumeMount) Reset() { *m = VolumeMount{} }
+func (m *VolumeMount) String() string { return proto.CompactTextString(m) }
+func (*VolumeMount) ProtoMessage() {}
+
+func (m *VolumeSource) Reset() { *m = VolumeSource{} }
+func (m *VolumeSource) String() string { return proto.CompactTextString(m) }
+func (*VolumeSource) ProtoMessage() {}
+
+func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} }
+func (m *VsphereVirtualDiskVolumeSource) String() string { return proto.CompactTextString(m) }
+func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {}
+
+func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} }
+func (m *WeightedPodAffinityTerm) String() string { return proto.CompactTextString(m) }
+func (*WeightedPodAffinityTerm) ProtoMessage() {}
+
+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((*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((*ConfigMapKeySelector)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapKeySelector")
+ proto.RegisterType((*ConfigMapList)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapList")
+ 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((*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((*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((*ExportOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.ExportOptions")
+ 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((*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((*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((*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((*OwnerReference)(nil), "k8s.io.kubernetes.pkg.api.v1.OwnerReference")
+ 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((*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((*PodProxyOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodProxyOptions")
+ proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.kubernetes.pkg.api.v1.PodSecurityContext")
+ 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((*Preconditions)(nil), "k8s.io.kubernetes.pkg.api.v1.Preconditions")
+ proto.RegisterType((*PreferredSchedulingTerm)(nil), "k8s.io.kubernetes.pkg.api.v1.PreferredSchedulingTerm")
+ proto.RegisterType((*Probe)(nil), "k8s.io.kubernetes.pkg.api.v1.Probe")
+ 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((*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((*Secret)(nil), "k8s.io.kubernetes.pkg.api.v1.Secret")
+ proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretKeySelector")
+ proto.RegisterType((*SecretList)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretList")
+ 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((*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((*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 *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 {
+ for k := range m.Data {
+ data[i] = 0x12
+ i++
+ v := m.Data[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 *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()))
+ n10, err := m.LocalObjectReference.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.Key)))
+ i += copy(data[i:], m.Key)
+ 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()))
+ 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 *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()))
+ n12, err := m.LocalObjectReference.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 *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()))
+ n13, err := m.Resources.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ 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()))
+ n14, err := m.LivenessProbe.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ if m.ReadinessProbe != nil {
+ data[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ReadinessProbe.Size()))
+ n15, err := m.ReadinessProbe.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ }
+ if m.Lifecycle != nil {
+ data[i] = 0x62
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Lifecycle.Size()))
+ n16, err := m.Lifecycle.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ }
+ 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()))
+ n17, err := m.SecurityContext.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ 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++
+ 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()))
+ n18, err := m.Waiting.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ if m.Running != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Running.Size()))
+ n19, err := m.Running.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ }
+ if m.Terminated != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Terminated.Size()))
+ n20, err := m.Terminated.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ 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()))
+ n21, err := m.StartedAt.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ 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()))
+ n22, err := m.StartedAt.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ data[i] = 0x32
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FinishedAt.Size()))
+ n23, err := m.FinishedAt.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ 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()))
+ n24, err := m.State.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.LastTerminationState.Size()))
+ n25, err := m.LastTerminationState.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ 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()))
+ n26, err := m.Preconditions.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ }
+ if m.OrphanDependents != nil {
+ data[i] = 0x18
+ i++
+ if *m.OrphanDependents {
+ data[i] = 1
+ } else {
+ data[i] = 0
+ }
+ i++
+ }
+ 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()))
+ n27, err := m.FieldRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ }
+ if m.ResourceFieldRef != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size()))
+ n28, err := m.ResourceFieldRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ }
+ 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
+ }
+ }
+ 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)
+ 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()))
+ n29, err := m.TargetRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ }
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.Hostname)))
+ i += copy(data[i:], m.Hostname)
+ 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()))
+ n30, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ 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()))
+ n31, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ 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 *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()))
+ n32, err := m.ValueFrom.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ }
+ 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()))
+ n33, err := m.FieldRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ }
+ if m.ResourceFieldRef != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size()))
+ n34, err := m.ResourceFieldRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ }
+ if m.ConfigMapKeyRef != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ConfigMapKeyRef.Size()))
+ n35, err := m.ConfigMapKeyRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ }
+ if m.SecretKeyRef != nil {
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.SecretKeyRef.Size()))
+ n36, err := m.SecretKeyRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ }
+ 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()))
+ n37, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.InvolvedObject.Size()))
+ n38, err := m.InvolvedObject.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ 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()))
+ n39, err := m.Source.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ data[i] = 0x32
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FirstTimestamp.Size()))
+ n40, err := m.FirstTimestamp.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n40
+ data[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.LastTimestamp.Size()))
+ n41, err := m.LastTimestamp.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n41
+ 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()))
+ 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 *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 *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 *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()))
+ n43, err := m.SecretRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ }
+ data[i] = 0x20
+ i++
+ if m.ReadOnly {
+ data[i] = 1
+ } else {
+ data[i] = 0
+ }
+ i++
+ if len(m.Options) > 0 {
+ for k := range m.Options {
+ data[i] = 0x2a
+ i++
+ v := m.Options[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)
+ 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()))
+ n44, err := m.Port.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ 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()))
+ n45, err := m.Exec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ }
+ if m.HTTPGet != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.HTTPGet.Size()))
+ n46, err := m.HTTPGet.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ }
+ if m.TCPSocket != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.TCPSocket.Size()))
+ n47, err := m.TCPSocket.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ }
+ 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++
+ 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)
+ 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()))
+ n48, err := m.PostStart.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ }
+ if m.PreStop != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.PreStop.Size()))
+ n49, err := m.PreStop.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ }
+ 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()))
+ n50, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n51, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ 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 {
+ for k := range m.Max {
+ data[i] = 0x12
+ i++
+ v := m.Max[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n52, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ }
+ }
+ if len(m.Min) > 0 {
+ for k := range m.Min {
+ data[i] = 0x1a
+ i++
+ v := m.Min[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n53, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ }
+ }
+ if len(m.Default) > 0 {
+ for k := range m.Default {
+ data[i] = 0x22
+ i++
+ v := m.Default[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n54, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ }
+ }
+ if len(m.DefaultRequest) > 0 {
+ for k := range m.DefaultRequest {
+ data[i] = 0x2a
+ i++
+ v := m.DefaultRequest[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n55, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ }
+ }
+ if len(m.MaxLimitRequestRatio) > 0 {
+ for k := range m.MaxLimitRequestRatio {
+ data[i] = 0x32
+ i++
+ v := m.MaxLimitRequestRatio[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n56, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ }
+ }
+ 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()))
+ n57, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ 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()))
+ n58, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ 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))
+ }
+ 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 *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()))
+ n59, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n60, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n61, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ 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()))
+ n62, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ 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()))
+ n63, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n63
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n64, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n65, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n65
+ 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()))
+ n66, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n66
+ }
+ 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()))
+ n67, err := m.LastHeartbeatTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n67
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size()))
+ n68, err := m.LastTransitionTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n68
+ 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()))
+ n69, err := m.KubeletEndpoint.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n69
+ 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()))
+ n70, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n70
+ 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 *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++
+ 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 {
+ for k := range m.Capacity {
+ data[i] = 0xa
+ i++
+ v := m.Capacity[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n71, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n71
+ }
+ }
+ if len(m.Allocatable) > 0 {
+ for k := range m.Allocatable {
+ data[i] = 0x12
+ i++
+ v := m.Allocatable[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n72, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n72
+ }
+ }
+ 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()))
+ n73, err := m.DaemonEndpoints.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n73
+ data[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.NodeInfo.Size()))
+ n74, err := m.NodeInfo.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n74
+ 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()))
+ n75, err := m.CreationTimestamp.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n75
+ if m.DeletionTimestamp != nil {
+ data[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size()))
+ n76, err := m.DeletionTimestamp.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n76
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ data[i] = 0x50
+ i++
+ i = encodeVarintGenerated(data, i, uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ data[i] = 0x5a
+ i++
+ v := m.Labels[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 {
+ for k := range m.Annotations {
+ data[i] = 0x62
+ i++
+ v := m.Annotations[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)
+ }
+ }
+ 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 *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++
+ }
+ 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()))
+ n77, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n77
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n78, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n78
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n79, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n79
+ 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()))
+ n80, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n80
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n81, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n81
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n82, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n82
+ 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()))
+ n83, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n83
+ 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()))
+ n84, err := m.Resources.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n84
+ 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()))
+ n85, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n85
+ }
+ 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 {
+ for k := range m.Capacity {
+ data[i] = 0x1a
+ i++
+ v := m.Capacity[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n86, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n86
+ }
+ }
+ 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()))
+ n87, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n87
+ 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()))
+ n88, err := m.GCEPersistentDisk.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n88
+ }
+ if m.AWSElasticBlockStore != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size()))
+ n89, err := m.AWSElasticBlockStore.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n89
+ }
+ if m.HostPath != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size()))
+ n90, err := m.HostPath.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n90
+ }
+ if m.Glusterfs != nil {
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size()))
+ n91, err := m.Glusterfs.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n91
+ }
+ if m.NFS != nil {
+ data[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.NFS.Size()))
+ n92, err := m.NFS.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n92
+ }
+ if m.RBD != nil {
+ data[i] = 0x32
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.RBD.Size()))
+ n93, err := m.RBD.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n93
+ }
+ if m.ISCSI != nil {
+ data[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size()))
+ n94, err := m.ISCSI.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n94
+ }
+ if m.Cinder != nil {
+ data[i] = 0x42
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size()))
+ n95, err := m.Cinder.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n95
+ }
+ if m.CephFS != nil {
+ data[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size()))
+ n96, err := m.CephFS.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n96
+ }
+ if m.FC != nil {
+ data[i] = 0x52
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FC.Size()))
+ n97, err := m.FC.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n97
+ }
+ if m.Flocker != nil {
+ data[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size()))
+ n98, err := m.Flocker.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n98
+ }
+ if m.FlexVolume != nil {
+ data[i] = 0x62
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size()))
+ n99, err := m.FlexVolume.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n99
+ }
+ if m.AzureFile != nil {
+ data[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size()))
+ n100, err := m.AzureFile.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n100
+ }
+ if m.VsphereVolume != nil {
+ data[i] = 0x72
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size()))
+ n101, err := m.VsphereVolume.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n101
+ }
+ 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 {
+ for k := range m.Capacity {
+ data[i] = 0xa
+ i++
+ v := m.Capacity[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n102, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n102
+ }
+ }
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeSource.Size()))
+ n103, err := m.PersistentVolumeSource.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n103
+ 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()))
+ n104, err := m.ClaimRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n104
+ }
+ data[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.PersistentVolumeReclaimPolicy)))
+ i += copy(data[i:], m.PersistentVolumeReclaimPolicy)
+ 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 *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()))
+ n105, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n105
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n106, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n106
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n107, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n107
+ 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()))
+ n108, err := m.LabelSelector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n108
+ }
+ 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()))
+ n109, err := m.LastProbeTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n109
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size()))
+ n110, err := m.LastTransitionTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n110
+ 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()))
+ n111, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n111
+ 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()))
+ n112, err := m.SinceTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n112
+ }
+ 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 *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()))
+ n113, err := m.SELinuxOptions.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n113
+ }
+ 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 *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 {
+ for k := range m.NodeSelector {
+ data[i] = 0x3a
+ i++
+ v := m.NodeSelector[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()))
+ n114, err := m.SecurityContext.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n114
+ }
+ 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)
+ 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()))
+ n115, err := m.StartTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n115
+ }
+ 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
+ }
+ }
+ 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()))
+ n116, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n116
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n117, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n117
+ 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()))
+ n118, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n118
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Template.Size()))
+ n119, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n119
+ 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()))
+ n120, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n120
+ 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()))
+ n121, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n121
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n122, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n122
+ 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 *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()))
+ n123, err := m.Preference.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n123
+ 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()))
+ n124, err := m.Handler.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n124
+ 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 *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()))
+ n125, err := m.SecretRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n125
+ }
+ 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()))
+ n126, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n126
+ 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()))
+ n127, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n127
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n128, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n128
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n129, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n129
+ 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()))
+ n130, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n130
+ 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 {
+ for k := range m.Selector {
+ data[i] = 0x12
+ i++
+ v := m.Selector[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()))
+ n131, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n131
+ }
+ 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))
+ 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()))
+ n132, err := m.Divisor.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n132
+ 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()))
+ 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.Spec.Size()))
+ n134, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n134
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n135, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n135
+ 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()))
+ n136, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n136
+ 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 {
+ for k := range m.Hard {
+ data[i] = 0xa
+ i++
+ v := m.Hard[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n137, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n137
+ }
+ }
+ 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 {
+ for k := range m.Hard {
+ data[i] = 0xa
+ i++
+ v := m.Hard[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n138, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n138
+ }
+ }
+ if len(m.Used) > 0 {
+ for k := range m.Used {
+ data[i] = 0x12
+ i++
+ v := m.Used[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n139, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n139
+ }
+ }
+ 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 {
+ for k := range m.Limits {
+ data[i] = 0xa
+ i++
+ v := m.Limits[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n140, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n140
+ }
+ }
+ if len(m.Requests) > 0 {
+ for k := range m.Requests {
+ data[i] = 0x12
+ i++
+ v := m.Requests[k]
+ msgSize := (&v).Size()
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(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()))
+ n141, err := (&v).MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n141
+ }
+ }
+ 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 *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()))
+ n142, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n142
+ if len(m.Data) > 0 {
+ for k := range m.Data {
+ data[i] = 0x12
+ i++
+ v := m.Data[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.Type)))
+ i += copy(data[i:], m.Type)
+ if len(m.StringData) > 0 {
+ for k := range m.StringData {
+ data[i] = 0x22
+ i++
+ v := m.StringData[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 *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()))
+ n143, err := m.LocalObjectReference.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n143
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.Key)))
+ i += copy(data[i:], m.Key)
+ 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()))
+ n144, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n144
+ 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 *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
+ }
+ }
+ 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()))
+ n145, err := m.Capabilities.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n145
+ }
+ 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()))
+ n146, err := m.SELinuxOptions.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n146
+ }
+ 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()))
+ n147, err := m.Reference.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n147
+ 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()))
+ n148, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n148
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n149, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n149
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n150, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n150
+ 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()))
+ n151, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n151
+ 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
+ }
+ }
+ 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()))
+ n152, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n152
+ 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()))
+ n153, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n153
+ 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()))
+ n154, err := m.TargetPort.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n154
+ 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 {
+ for k := range m.Selector {
+ data[i] = 0x12
+ i++
+ v := m.Selector[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)
+ }
+ }
+ if len(m.DeprecatedPublicIPs) > 0 {
+ for _, s := range m.DeprecatedPublicIPs {
+ 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)
+ }
+ }
+ 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)
+ }
+ }
+ 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()))
+ n155, err := m.LoadBalancer.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n155
+ 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()))
+ n156, err := m.Port.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n156
+ 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)
+ 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)
+ 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()))
+ n157, err := m.VolumeSource.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n157
+ 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 *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()))
+ n158, err := m.HostPath.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n158
+ }
+ if m.EmptyDir != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.EmptyDir.Size()))
+ n159, err := m.EmptyDir.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n159
+ }
+ if m.GCEPersistentDisk != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size()))
+ n160, err := m.GCEPersistentDisk.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n160
+ }
+ if m.AWSElasticBlockStore != nil {
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size()))
+ n161, err := m.AWSElasticBlockStore.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n161
+ }
+ if m.GitRepo != nil {
+ data[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.GitRepo.Size()))
+ n162, err := m.GitRepo.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n162
+ }
+ if m.Secret != nil {
+ data[i] = 0x32
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Secret.Size()))
+ n163, err := m.Secret.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n163
+ }
+ if m.NFS != nil {
+ data[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.NFS.Size()))
+ n164, err := m.NFS.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n164
+ }
+ if m.ISCSI != nil {
+ data[i] = 0x42
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size()))
+ n165, err := m.ISCSI.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n165
+ }
+ if m.Glusterfs != nil {
+ data[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size()))
+ n166, err := m.Glusterfs.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n166
+ }
+ if m.PersistentVolumeClaim != nil {
+ data[i] = 0x52
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeClaim.Size()))
+ n167, err := m.PersistentVolumeClaim.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n167
+ }
+ if m.RBD != nil {
+ data[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.RBD.Size()))
+ n168, err := m.RBD.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n168
+ }
+ if m.FlexVolume != nil {
+ data[i] = 0x62
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size()))
+ n169, err := m.FlexVolume.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n169
+ }
+ if m.Cinder != nil {
+ data[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size()))
+ n170, err := m.Cinder.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n170
+ }
+ if m.CephFS != nil {
+ data[i] = 0x72
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size()))
+ n171, err := m.CephFS.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n171
+ }
+ if m.Flocker != nil {
+ data[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size()))
+ n172, err := m.Flocker.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n172
+ }
+ if m.DownwardAPI != nil {
+ data[i] = 0x82
+ i++
+ data[i] = 0x1
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.DownwardAPI.Size()))
+ n173, err := m.DownwardAPI.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n173
+ }
+ if m.FC != nil {
+ data[i] = 0x8a
+ i++
+ data[i] = 0x1
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FC.Size()))
+ n174, err := m.FC.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n174
+ }
+ if m.AzureFile != nil {
+ data[i] = 0x92
+ i++
+ data[i] = 0x1
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size()))
+ n175, err := m.AzureFile.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n175
+ }
+ if m.ConfigMap != nil {
+ data[i] = 0x9a
+ i++
+ data[i] = 0x1
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ConfigMap.Size()))
+ n176, err := m.ConfigMap.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n176
+ }
+ if m.VsphereVolume != nil {
+ data[i] = 0xa2
+ i++
+ data[i] = 0x1
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size()))
+ n177, err := m.VsphereVolume.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n177
+ }
+ 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)
+ 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()))
+ n178, err := m.PodAffinityTerm.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n178
+ 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 *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 *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))
+ 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 *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))
+ }
+ }
+ 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
+ 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
+ }
+ 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))
+ }
+ 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))
+ }
+ }
+ return n
+}
+
+func (m *EmptyDirVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Medium)
+ 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))
+ 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 *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 *ExportOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ 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))
+ 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 *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
+ 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))
+ 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))
+ }
+ 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 *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 *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
+ 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))
+ }
+ }
+ 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 *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
+ }
+ 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))
+ }
+ 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))
+ }
+ 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))
+ 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 *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 *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 *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))
+ 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))
+ }
+ }
+ 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 *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 *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 *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 *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))
+ }
+ 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))
+ 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 *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
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ 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 *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))
+ 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 *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))
+ }
+ }
+ 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))
+ }
+ }
+ 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))
+ }
+ }
+ if len(m.DeprecatedPublicIPs) > 0 {
+ for _, s := range m.DeprecatedPublicIPs {
+ 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))
+ }
+ }
+ 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 *TCPSocketAction) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Port.Size()
+ 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))
+ 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))
+ 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 *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))
+ }
+ 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))
+ 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 (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 *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
+ 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
+ if m.Data == nil {
+ m.Data = make(map[string]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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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 *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 *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
+ 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
+ if m.Options == nil {
+ m.Options = make(map[string]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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Max == nil {
+ m.Max = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Min == nil {
+ m.Min = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Default == nil {
+ m.Default = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.DefaultRequest == nil {
+ m.DefaultRequest = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.MaxLimitRequestRatio == nil {
+ m.MaxLimitRequestRatio = make(ResourceList)
+ }
+ 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_kubernetes_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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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 *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)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Allocatable == nil {
+ m.Allocatable = make(ResourceList)
+ }
+ 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_kubernetes_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_kubernetes_pkg_api_unversioned.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
+ 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
+ if m.Labels == nil {
+ m.Labels = make(map[string]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
+ 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
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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_kubernetes_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 *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_kubernetes_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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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_kubernetes_pkg_api_unversioned.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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_kubernetes_pkg_api_unversioned.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_kubernetes_pkg_api_unversioned.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 *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 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", 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.SupplementalGroups = append(m.SupplementalGroups, v)
+ 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 *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
+ 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
+ if m.NodeSelector == nil {
+ m.NodeSelector = make(map[string]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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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_kubernetes_pkg_api_unversioned.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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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_kubernetes_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 *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 *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 *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
+ 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
+ if m.Selector == nil {
+ m.Selector = make(map[string]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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Hard == nil {
+ m.Hard = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Hard == nil {
+ m.Hard = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Used == nil {
+ m.Used = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Limits == nil {
+ m.Limits = make(ResourceList)
+ }
+ 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
+ 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_kubernetes_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ if m.Requests == nil {
+ m.Requests = make(ResourceList)
+ }
+ 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 *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
+ 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
+ if m.Data == nil {
+ m.Data = make(map[string][]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
+ 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
+ if m.StringData == nil {
+ m.StringData = make(map[string]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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ 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
+ if m.Selector == nil {
+ m.Selector = make(map[string]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 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedPublicIPs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DeprecatedPublicIPs = append(m.DeprecatedPublicIPs, 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto
new file mode 100644
index 0000000..060b6ca
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto
@@ -0,0 +1,2935 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ 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 int32 partition = 3;
+
+ // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
+ // If omitted, the default is "false".
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ optional bool readOnly = 4;
+}
+
+// Affinity is a group of affinity scheduling rules.
+message Affinity {
+ // Describes node affinity scheduling rules for the pod.
+ 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 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 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 avilable
+ optional string devicePath = 2;
+}
+
+// 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 bool readOnly = 3;
+}
+
+// Binding ties one object to another.
+// For example, a pod is bound to a node by a scheduler.
+message Binding {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional 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
+ repeated string add = 1;
+
+ // Removed capabilities
+ 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: http://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 string path = 2;
+
+ // Optional: User is the rados user name, default is admin
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ optional string user = 3;
+
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ optional string secretFile = 4;
+
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ optional LocalObjectReference secretRef = 5;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ 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: http://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: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ optional string fsType = 2;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ 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 string message = 3;
+
+ // Condition error code for a component.
+ // For example, a health check error code.
+ optional string error = 4;
+}
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+message ComponentStatus {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // List of component conditions observed
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Data contains the configuration data.
+ // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
+ map<string, string> data = 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;
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+message ConfigMapList {
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of ConfigMaps.
+ repeated ConfigMap items = 2;
+}
+
+// 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. Paths must be relative and may not contain
+ // the '..' path or start with '..'.
+ repeated KeyToPath items = 2;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/containers.md#containers-and-commands
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/containers.md#containers-and-commands
+ 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 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.
+ repeated ContainerPort ports = 6;
+
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ repeated EnvVar env = 7;
+
+ // Compute Resources required by this container.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#resources
+ optional ResourceRequirements resources = 8;
+
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ repeated VolumeMount volumeMounts = 9;
+
+ // Periodic probe of container liveness.
+ // Container will be restarted if the probe fails.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ optional Probe readinessProbe = 11;
+
+ // Actions that the management system should take in response to container lifecycle events.
+ // Cannot be updated.
+ 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.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ optional string terminationMessagePath = 13;
+
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#updating-images
+ optional string imagePullPolicy = 14;
+
+ // Security options the pod should run with.
+ // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md
+ 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 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 bool stdinOnce = 17;
+
+ // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
+ // Default is false.
+ 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 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 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 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 string protocol = 4;
+
+ // What host IP to bind the external port to.
+ 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 ContainerStateWaiting waiting = 1;
+
+ // Details about a running container
+ optional ContainerStateRunning running = 2;
+
+ // Details about a terminated container
+ optional ContainerStateTerminated terminated = 3;
+}
+
+// ContainerStateRunning is a running state of a container.
+message ContainerStateRunning {
+ // Time at which the container was last (re-)started
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 int32 signal = 2;
+
+ // (brief) reason from the last termination of the container
+ optional string reason = 3;
+
+ // Message regarding the last termination of the container
+ optional string message = 4;
+
+ // Time at which previous execution of the container started
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time startedAt = 5;
+
+ // Time at which the container last terminated
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time finishedAt = 6;
+
+ // Container's ID in the format 'docker://<container_id>'
+ optional string containerID = 7;
+}
+
+// ContainerStateWaiting is a waiting state of a container.
+message ContainerStateWaiting {
+ // (brief) reason the container is not yet running.
+ optional string reason = 1;
+
+ // Message regarding why the container is not yet running.
+ 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 ContainerState state = 2;
+
+ // Details about the container's last termination condition.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md
+ // 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>'.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information
+ 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
+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 int64 gracePeriodSeconds = 1;
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ optional Preconditions preconditions = 2;
+
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ optional bool orphanDependents = 3;
+}
+
+// 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 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 ResourceFieldSelector resourceFieldRef = 3;
+}
+
+// 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
+ repeated DownwardAPIVolumeFile items = 1;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir
+ optional string medium = 1;
+}
+
+// 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 string hostname = 3;
+
+ // Reference to object providing the endpoint.
+ 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 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 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.
+ 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.
+ repeated EndpointAddress notReadyAddresses = 2;
+
+ // Port numbers available on the related IP addresses.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of endpoints.
+ repeated Endpoints items = 2;
+}
+
+// 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 string value = 2;
+
+ // Source for the environment variable's value. Cannot be used if value is not empty.
+ optional EnvVarSource valueFrom = 3;
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+message EnvVarSource {
+ // Selects a field of the pod; only name and namespace are supported.
+ 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 ResourceFieldSelector resourceFieldRef = 2;
+
+ // Selects a key of a ConfigMap.
+ optional ConfigMapKeySelector configMapKeyRef = 3;
+
+ // Selects a key of a secret in the pod's namespace
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional 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 string reason = 3;
+
+ // A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ optional string message = 4;
+
+ // The component reporting this event. Should be a short machine understandable string.
+ optional EventSource source = 5;
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time firstTimestamp = 6;
+
+ // The time at which the most recent occurrence of this event was recorded.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTimestamp = 7;
+
+ // The number of times this event has occurred.
+ optional int32 count = 8;
+
+ // Type of this event (Normal, Warning), new types could be added in the future
+ optional string type = 9;
+}
+
+// EventList is a list of events.
+message EventList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 string component = 1;
+
+ // Host name on which the event is generated.
+ 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.
+ repeated string command = 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;
+}
+
+// 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 world wide 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 string fsType = 3;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ optional bool readOnly = 4;
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using a 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 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 LocalObjectReference secretRef = 3;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ optional bool readOnly = 4;
+
+ // Optional: Extra command options if any.
+ map<string, string> options = 5;
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+message FlockerVolumeSource {
+ // Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
+ optional string datasetName = 1;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ optional int32 partition = 3;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ 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 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 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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ optional string endpoints = 1;
+
+ // Path is the Glusterfs volume path.
+ // More info: http://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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ optional bool readOnly = 3;
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+message HTTPGetAction {
+ // Path to access on the HTTP server.
+ 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.kubernetes.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 string host = 3;
+
+ // Scheme to use for connecting to the host.
+ // Defaults to HTTP.
+ optional string scheme = 4;
+
+ // Custom headers to set in the request. HTTP allows repeated headers.
+ 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 ExecAction exec = 1;
+
+ // HTTPGet specifies the http request to perform.
+ 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 TCPSocketAction tcpSocket = 3;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ optional string fsType = 5;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ optional bool readOnly = 6;
+}
+
+// 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;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the limits enforced.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 string type = 1;
+
+ // Max usage constraints on this kind by resource name.
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> max = 2;
+
+ // Min usage constraints on this kind by resource name.
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> min = 3;
+
+ // Default resource requirement limit value by resource name if resource limit is omitted.
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> default = 4;
+
+ // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+ map<string, k8s.io.kubernetes.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.
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> maxLimitRequestRatio = 6;
+}
+
+// LimitRangeList is a list of LimitRange items.
+message LimitRangeList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is a list of LimitRange objects.
+ // More info: http://releases.k8s.io/HEAD/docs/design/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of objects
+ repeated k8s.io.kubernetes.pkg.runtime.RawExtension items = 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 string labelSelector = 1;
+
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ optional string fieldSelector = 2;
+
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ 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.
+ optional string resourceVersion = 4;
+
+ // Timeout for the list/watch call.
+ 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 string ip = 1;
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ // TODO: Add other useful fields. apiVersion, kind, uid?
+ optional string name = 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ optional string server = 1;
+
+ // Path that is exported by the NFS server.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ optional string path = 2;
+
+ // ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ optional bool readOnly = 3;
+}
+
+// Namespace provides a scope for Names.
+// Use of multiple namespaces is optional.
+message Namespace {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of the Namespace.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional NamespaceSpec spec = 2;
+
+ // Status describes the current status of a Namespace.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional NamespaceStatus status = 3;
+}
+
+// NamespaceList is a list of Namespaces.
+message NamespaceList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of Namespace objects in the list.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md
+ 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: http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers
+ 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: http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases
+ optional string phase = 1;
+}
+
+// Node is a worker node in Kubernetes, formerly known as minion.
+// Each node will have a unique identifier in the cache (i.e. in etcd).
+message Node {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of a node.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional NodeSpec spec = 2;
+
+ // Most recently observed status of the node.
+ // Populated by the system.
+ // Read-only.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 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.
+ repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// NodeCondition contains condition infromation 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 k8s.io.kubernetes.pkg.api.unversioned.Time lastHeartbeatTime = 3;
+
+ // Last time the condition transit from one status to another.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ optional string message = 6;
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+message NodeDaemonEndpoints {
+ // Endpoint on which Kubelet is listening.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 string path = 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.
+ 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.
+ 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 string podCIDR = 1;
+
+ // External ID of the node assigned by some machine database (e.g. a cloud provider).
+ // Deprecated.
+ optional string externalID = 2;
+
+ // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
+ optional string providerID = 3;
+
+ // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"`
+ optional bool unschedulable = 4;
+}
+
+// NodeStatus is information about the current status of a node.
+message NodeStatus {
+ // Capacity represents the total resources of a node.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity for more details.
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> capacity = 1;
+
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // Defaults to Capacity.
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> allocatable = 2;
+
+ // NodePhase is the recently observed lifecycle phase of the node.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase
+ optional string phase = 3;
+
+ // Conditions is an array of current observed node conditions.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition
+ repeated NodeCondition conditions = 4;
+
+ // List of addresses reachable to the node.
+ // Queried from cloud provider, if available.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses
+ repeated NodeAddress addresses = 5;
+
+ // Endpoints of daemons running on the Node.
+ optional NodeDaemonEndpoints daemonEndpoints = 6;
+
+ // Set of ids/uuids to uniquely identify the node.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info
+ optional NodeSystemInfo nodeInfo = 7;
+
+ // List of container images on this node
+ repeated ContainerImage images = 8;
+
+ // List of attachable volumes in use (mounted) by the node.
+ repeated string volumesInUse = 9;
+
+ // List of volumes that are attached to the node.
+ repeated AttachedVolume volumesAttached = 10;
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+message NodeSystemInfo {
+ // Machine ID reported by the node.
+ optional string machineID = 1;
+
+ // System UUID reported by the node.
+ 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 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.
+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://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency
+ 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://releases.k8s.io/HEAD/docs/user-guide/namespaces.md
+ optional string namespace = 3;
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ 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://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
+ optional string resourceVersion = 6;
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 will 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. Once the resource is deleted in the API, the Kubelet
+ // will send a hard termination signal to the container.
+ // 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 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://releases.k8s.io/HEAD/docs/user-guide/labels.md
+ // TODO: replace map[string]string with labels.LabelSet type
+ 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://releases.k8s.io/HEAD/docs/user-guide/annotations.md
+ 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.
+ repeated OwnerReference ownerReferences = 13;
+
+ // 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.
+ repeated string finalizers = 14;
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+message ObjectReference {
+ // Kind of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional string kind = 1;
+
+ // Namespace of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md
+ optional string namespace = 2;
+
+ // Name of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ optional string name = 3;
+
+ // UID of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ optional string uid = 4;
+
+ // API version of the referent.
+ optional string apiVersion = 5;
+
+ // Specific resourceVersion to which this reference is made, if any.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
+ 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 string fieldPath = 7;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional string kind = 1;
+
+ // Name of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ optional string name = 3;
+
+ // UID of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ optional string uid = 4;
+
+ // If true, this reference points to the managing controller.
+ optional bool controller = 6;
+}
+
+// PersistentVolume (PV) is a storage resource provisioned by an administrator.
+// It is analogous to a node.
+// More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md
+message PersistentVolume {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines a specification of a persistent volume owned by the cluster.
+ // Provisioned by an administrator.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes
+ optional PersistentVolumeSpec spec = 2;
+
+ // Status represents the current information/status for the persistent volume.
+ // Populated by the system.
+ // Read-only.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the desired characteristics of a volume requested by a pod author.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ optional PersistentVolumeClaimSpec spec = 2;
+
+ // Status represents the current information/status of a persistent volume claim.
+ // Read-only.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ optional PersistentVolumeClaimStatus status = 3;
+}
+
+// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
+message PersistentVolumeClaimList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // A list of persistent volume claims.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1
+ repeated string accessModes = 1;
+
+ // A label query over volumes to consider for binding.
+ optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 4;
+
+ // Resources represents the minimum resources the volume should have.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#resources
+ optional ResourceRequirements resources = 2;
+
+ // VolumeName is the binding reference to the PersistentVolume backing this claim.
+ optional string volumeName = 3;
+}
+
+// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
+message PersistentVolumeClaimStatus {
+ // Phase represents the current phase of PersistentVolumeClaim.
+ optional string phase = 1;
+
+ // AccessModes contains the actual access modes the volume backing the PVC has.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1
+ repeated string accessModes = 2;
+
+ // Represents the actual resources of the underlying volume.
+ map<string, k8s.io.kubernetes.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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ optional string claimName = 1;
+
+ // Will force the ReadOnly setting in VolumeMounts.
+ // Default false.
+ optional bool readOnly = 2;
+}
+
+// PersistentVolumeList is a list of PersistentVolume items.
+message PersistentVolumeList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of persistent volumes.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath
+ 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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ optional GlusterfsVolumeSource glusterfs = 4;
+
+ // NFS represents an NFS mount on the host. Provisioned by an admin.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ optional NFSVolumeSource nfs = 5;
+
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ 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 ISCSIVolumeSource iscsi = 7;
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ optional CinderVolumeSource cinder = 8;
+
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ 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 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 FlockerVolumeSource flocker = 11;
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using a exec based plugin. This is an
+ // alpha feature and may change in future.
+ optional FlexVolumeSource flexVolume = 12;
+
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ optional AzureFileVolumeSource azureFile = 13;
+
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
+}
+
+// PersistentVolumeSpec is the specification of a persistent volume.
+message PersistentVolumeSpec {
+ // A description of the persistent volume's resources and capacity.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity
+ map<string, k8s.io.kubernetes.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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#binding
+ optional ObjectReference claimRef = 4;
+
+ // What happens to a persistent volume when released from its claim.
+ // Valid options are Retain (default) and Recycle.
+ // Recyling must be supported by the volume plugin underlying this persistent volume.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy
+ optional string persistentVolumeReclaimPolicy = 5;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#phase
+ optional string phase = 1;
+
+ // A human-readable message indicating details about why the volume is in this state.
+ 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 string reason = 3;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the pod.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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.
+ // 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.
+ 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.
+ 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 k8s.io.kubernetes.pkg.api.unversioned.LabelSelector labelSelector = 1;
+
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // nil list means "this pod's namespace," empty list means "all namespaces"
+ // The json tag here is not "omitempty" since we need to distinguish nil and empty.
+ // See https://golang.org/pkg/encoding/json/#Marshal for more details.
+ 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 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.
+ // 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.
+ 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.
+ 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 bool stdin = 1;
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call.
+ // Defaults to true.
+ optional bool stdout = 2;
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call.
+ // Defaults to true.
+ 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 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 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions
+ optional string type = 1;
+
+ // Status is the status of the condition.
+ // Can be True, False, Unknown.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions
+ optional string status = 2;
+
+ // Last time we probed the condition.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
+
+ // Last time the condition transitioned from one status to another.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
+
+ // Unique, one-word, CamelCase reason for the condition's last transition.
+ optional string reason = 5;
+
+ // Human-readable message indicating details about last transition.
+ 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 bool stdin = 1;
+
+ // Redirect the standard output stream of the pod for this call.
+ // Defaults to true.
+ optional bool stdout = 2;
+
+ // Redirect the standard error stream of the pod for this call.
+ // Defaults to true.
+ optional bool stderr = 3;
+
+ // TTY if true indicates that a tty will be allocated for the exec call.
+ // Defaults to false.
+ 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of pods.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pods.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 string container = 1;
+
+ // Follow the log stream of the pod. Defaults to false.
+ optional bool follow = 2;
+
+ // Return previous terminated container logs. Defaults to false.
+ 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 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 k8s.io.kubernetes.pkg.api.unversioned.Time sinceTime = 5;
+
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output. Defaults to false.
+ 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 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 int64 limitBytes = 8;
+}
+
+// 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 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 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 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 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.
+ 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 int64 fsGroup = 5;
+}
+
+// PodSpec is a description of a pod.
+message PodSpec {
+ // List of volumes that can be mounted by containers belonging to the pod.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md
+ repeated Volume volumes = 1;
+
+ // 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.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/containers.md
+ repeated Container containers = 2;
+
+ // Restart policy for all containers within the pod.
+ // One of Always, OnFailure, Never.
+ // Default to Always.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#restartpolicy
+ 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 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 int64 activeDeadlineSeconds = 5;
+
+ // Set DNS policy for containers within the pod.
+ // One of 'ClusterFirst' or 'Default'.
+ // Defaults to "ClusterFirst".
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md
+ map<string, string> nodeSelector = 7;
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
+ // More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md
+ optional string serviceAccountName = 8;
+
+ // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
+ // Deprecated: Use serviceAccountName instead.
+ // +k8s:conversion-gen=false
+ optional string serviceAccount = 9;
+
+ // 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 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 bool hostNetwork = 11;
+
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ optional bool hostPID = 12;
+
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ 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 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod
+ 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 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 string subdomain = 17;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase
+ optional string phase = 1;
+
+ // Current service state of pod.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions
+ repeated PodCondition conditions = 2;
+
+ // A human readable message indicating details about why the pod is in this condition.
+ optional string message = 3;
+
+ // A brief CamelCase message indicating details about why the pod is in this state.
+ // e.g. 'OutOfDisk'
+ optional string reason = 4;
+
+ // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
+ optional string hostIP = 5;
+
+ // IP address allocated to the pod. Routable at least within the cluster.
+ // Empty if not yet allocated.
+ 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 k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 7;
+
+ // The list has one entry per container in the manifest. Each entry is currently the output
+ // of `docker inspect`.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses
+ repeated ContainerStatus containerStatuses = 8;
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+message PodStatusResult {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional PodStatus status = 2;
+}
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+message PodTemplate {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Template defines the pods that will be created from this pod template.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional PodTemplateSpec template = 2;
+}
+
+// PodTemplateList is a list of PodTemplates.
+message PodTemplateList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the pod.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional PodSpec spec = 2;
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+message Preconditions {
+ // Specifies the target UID.
+ optional string uid = 1;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ optional int32 initialDelaySeconds = 2;
+
+ // Number of seconds after which the probe times out.
+ // Defaults to 1 second. Minimum value is 1.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ optional int32 timeoutSeconds = 3;
+
+ // How often (in seconds) to perform the probe.
+ // Default to 10 seconds. Minimum value is 1.
+ 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 int32 successThreshold = 5;
+
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // Defaults to 3. Minimum value is 1.
+ optional int32 failureThreshold = 6;
+}
+
+// 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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ repeated string monitors = 1;
+
+ // The rados image name.
+ // More info: http://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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#rbd
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ optional string fsType = 3;
+
+ // The rados pool name.
+ // Default is rbd.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it.
+ optional string pool = 4;
+
+ // The rados user name.
+ // Default is admin.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ optional string user = 5;
+
+ // Keyring is the path to key ring for RBDUser.
+ // Default is /etc/ceph/keyring.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ optional string keyring = 6;
+
+ // SecretRef is name of the authentication secret for RBDUser. If provided
+ // overrides keyring.
+ // Default is nil.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ optional LocalObjectReference secretRef = 7;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ optional bool readOnly = 8;
+}
+
+// RangeAllocation is not a public type.
+message RangeAllocation {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the specification of the desired behavior of the replication controller.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ReplicationControllerStatus status = 3;
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+message ReplicationControllerList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of replication controllers.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ optional int32 replicas = 1;
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ optional int32 replicas = 1;
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ optional int32 fullyLabeledReplicas = 2;
+
+ // ObservedGeneration reflects the generation of the most recently observed replication controller.
+ optional int64 observedGeneration = 3;
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+message ResourceFieldSelector {
+ // Container name: required for volumes, optional for env vars
+ optional string containerName = 1;
+
+ // Required: resource to select
+ optional string resource = 2;
+
+ // Specifies the output format of the exposed resources, defaults to "1"
+ optional k8s.io.kubernetes.pkg.api.resource.Quantity divisor = 3;
+}
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+message ResourceQuota {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the desired quota.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ResourceQuotaSpec spec = 2;
+
+ // Status defines the actual enforced quota and its current usage.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ResourceQuotaStatus status = 3;
+}
+
+// ResourceQuotaList is a list of ResourceQuota items.
+message ResourceQuotaList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is a list of ResourceQuota objects.
+ // More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota
+ 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: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota
+ map<string, k8s.io.kubernetes.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.
+ 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: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota
+ map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> hard = 1;
+
+ // Used is the current observed total usage of the resource in the namespace.
+ map<string, k8s.io.kubernetes.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: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
+ map<string, k8s.io.kubernetes.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: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
+ map<string, k8s.io.kubernetes.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 string user = 1;
+
+ // Role is a SELinux role label that applies to the container.
+ optional string role = 2;
+
+ // Type is a SELinux type label that applies to the container.
+ optional string type = 3;
+
+ // Level is SELinux level label that applies to the container.
+ optional string level = 4;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN
+ // or leading dot followed by valid DNS_SUBDOMAIN.
+ // 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
+ 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
+ map<string, string> stringData = 4;
+
+ // Used to facilitate programmatic handling of secret data.
+ optional string type = 3;
+}
+
+// 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;
+}
+
+// SecretList is a list of Secret.
+message SecretList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is a list of secret objects.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md
+ repeated Secret items = 2;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets
+ 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. Paths must be relative and may not contain
+ // the '..' path or start with '..'.
+ repeated KeyToPath items = 2;
+}
+
+// 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 Capabilities capabilities = 1;
+
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ 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 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 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 bool runAsNonRoot = 5;
+
+ // Whether this container has a read-only root filesystem.
+ // Default is false.
+ optional bool readOnlyRootFilesystem = 6;
+}
+
+// SerializedReference is a reference to serialized object.
+message SerializedReference {
+ // The reference to an object in the system.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of a service.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ServiceSpec spec = 2;
+
+ // Most recently observed status of the service.
+ // Populated by the system.
+ // Read-only.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional ObjectMeta metadata = 1;
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md#manually-specifying-an-imagepullsecret
+ repeated LocalObjectReference imagePullSecrets = 3;
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+message ServiceAccountList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of ServiceAccounts.
+ // More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts
+ repeated ServiceAccount items = 2;
+}
+
+// ServiceList holds a list of services.
+message ServiceList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 string name = 1;
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ // Default is TCP.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#defining-a-service
+ optional k8s.io.kubernetes.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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport
+ 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 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
+ repeated ServicePort ports = 1;
+
+ // This service will route traffic to pods having labels matching this selector.
+ // Label keys and values that must match in order to receive traffic for this service.
+ // If not specified, endpoints must be manually specified and the system will not automatically manage them.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
+ map<string, string> selector = 2;
+
+ // ClusterIP is usually assigned by the master and is the IP address of the service.
+ // If specified, it will be allocated to the service if it is unused
+ // or else creation of the service will fail.
+ // Valid values are None, empty string (""), or a valid IP address.
+ // 'None' can be specified for a headless service when proxying is not required.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
+ optional string clusterIP = 3;
+
+ // Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer.
+ // Defaults to ClusterIP.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services
+ 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. A previous form of this
+ // functionality exists as the deprecatedPublicIPs field. When using this
+ // field, callers should also clear the deprecatedPublicIPs field.
+ repeated string externalIPs = 5;
+
+ // deprecatedPublicIPs is deprecated and replaced by the externalIPs field
+ // with almost the exact same semantics. This field is retained in the v1
+ // API for compatibility until at least 8/20/2016. It will be removed from
+ // any new API revisions. If both deprecatedPublicIPs *and* externalIPs are
+ // set, deprecatedPublicIPs is used.
+ // +k8s:conversion-gen=false
+ repeated string deprecatedPublicIPs = 6;
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
+ 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 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: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
+ repeated string loadBalancerSourceRanges = 9;
+}
+
+// ServiceStatus represents the current status of a service.
+message ServiceStatus {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ optional LoadBalancerStatus loadBalancer = 1;
+}
+
+// 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.kubernetes.pkg.util.intstr.IntOrString port = 1;
+}
+
+// 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.
+ optional string key = 1;
+
+ // Required. The taint value corresponding to the taint key.
+ optional string value = 2;
+
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule and PreferNoSchedule.
+ optional string effect = 3;
+}
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+message Toleration {
+ // Required. Key is the taint key that the toleration applies to.
+ 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 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 string value = 3;
+
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule and PreferNoSchedule.
+ optional string effect = 4;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#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 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 string subPath = 4;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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 HostPathVolumeSource hostPath = 1;
+
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4;
+
+ // GitRepo represents a git repository at a particular revision.
+ optional GitRepoVolumeSource gitRepo = 5;
+
+ // Secret represents a secret that should populate this volume.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets
+ optional SecretVolumeSource secret = 6;
+
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ 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: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ optional ISCSIVolumeSource iscsi = 8;
+
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ optional GlusterfsVolumeSource glusterfs = 9;
+
+ // PersistentVolumeClaimVolumeSource represents a reference to a
+ // PersistentVolumeClaim in the same namespace.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10;
+
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ optional RBDVolumeSource rbd = 11;
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using a exec based plugin. This is an
+ // alpha feature and may change in future.
+ optional FlexVolumeSource flexVolume = 12;
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ optional CinderVolumeSource cinder = 13;
+
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ 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 FlockerVolumeSource flocker = 15;
+
+ // DownwardAPI represents downward API about the pod that should populate this volume
+ 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 FCVolumeSource fc = 17;
+
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ optional AzureFileVolumeSource azureFile = 18;
+
+ // ConfigMap represents a configMap that should populate this volume
+ optional ConfigMapVolumeSource configMap = 19;
+
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
+}
+
+// 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 string fsType = 2;
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go
new file mode 100644
index 0000000..d5ba042
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/meta.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 v1
+
+import (
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/meta/metatypes"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/types"
+)
+
+func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj }
+
+// Namespace implements meta.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) GetSelfLink() string { return meta.SelfLink }
+func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
+func (meta *ObjectMeta) GetCreationTimestamp() unversioned.Time { return meta.CreationTimestamp }
+func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp unversioned.Time) {
+ meta.CreationTimestamp = creationTimestamp
+}
+func (meta *ObjectMeta) GetDeletionTimestamp() *unversioned.Time { return meta.DeletionTimestamp }
+func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *unversioned.Time) {
+ meta.DeletionTimestamp = deletionTimestamp
+}
+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) GetFinalizers() []string { return meta.Finalizers }
+func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers }
+
+func (meta *ObjectMeta) GetOwnerReferences() []metatypes.OwnerReference {
+ ret := make([]metatypes.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
+ }
+ }
+ return ret
+}
+
+func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference) {
+ 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
+ }
+ }
+ meta.OwnerReferences = newReferences
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/register.go
new file mode 100644
index 0000000..8c625b8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/register.go
@@ -0,0 +1,94 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = ""
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+ addConversionFuncs(scheme)
+ addDefaultingFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ 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{},
+ &DeleteOptions{},
+ &ExportOptions{},
+ &ListOptions{},
+ &PodAttachOptions{},
+ &PodLogOptions{},
+ &PodExecOptions{},
+ &PodProxyOptions{},
+ &ComponentStatus{},
+ &ComponentStatusList{},
+ &SerializedReference{},
+ &RangeAllocation{},
+ &ConfigMap{},
+ &ConfigMapList{},
+ )
+
+ // Add common types
+ scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.Status{})
+
+ // Add the watch version that applies
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go
new file mode 100644
index 0000000..93c45da
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go
@@ -0,0 +1,60001 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg5_runtime "k8s.io/kubernetes/pkg/runtime"
+ pkg1_types "k8s.io/kubernetes/pkg/types"
+ pkg4_intstr "k8s.io/kubernetes/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_unversioned.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 [14]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] = len(x.Finalizers) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ 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.encSliceOwnerReference(([]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.encSliceOwnerReference(([]OwnerReference)(x.OwnerReferences), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym48 := z.EncBinary()
+ _ = yym48
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ }
+ }
+ 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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "generateName":
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ x.GenerateName = string(r.DecodeString())
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(r.DecodeString())
+ }
+ case "selfLink":
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ x.SelfLink = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "generation":
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ x.Generation = int64(r.DecodeInt(64))
+ }
+ case "creationTimestamp":
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv11 := &x.CreationTimestamp
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(yyv11)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ case "deletionTimestamp":
+ if r.TryDecodeAsNil() {
+ if x.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_unversioned.Time)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym14 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym14 && 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)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "labels":
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv17 := &x.Labels
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv17, false, d)
+ }
+ }
+ case "annotations":
+ if r.TryDecodeAsNil() {
+ x.Annotations = nil
+ } else {
+ yyv19 := &x.Annotations
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv19, false, d)
+ }
+ }
+ case "ownerReferences":
+ if r.TryDecodeAsNil() {
+ x.OwnerReferences = nil
+ } else {
+ yyv21 := &x.OwnerReferences
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.decSliceOwnerReference((*[]OwnerReference)(yyv21), d)
+ }
+ }
+ case "finalizers":
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv23 := &x.Finalizers
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, false, d)
+ }
+ }
+ 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 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() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ x.GenerateName = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ x.SelfLink = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ x.Generation = int64(r.DecodeInt(64))
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv33 := &x.CreationTimestamp
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv33) {
+ } else if yym34 {
+ z.DecBinaryUnmarshal(yyv33)
+ } else if !yym34 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv33)
+ } else {
+ z.DecFallback(yyv33, false)
+ }
+ }
+ 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.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_unversioned.Time)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym36 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym36 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.DeletionTimestamp)
+ } else {
+ z.DecFallback(x.DeletionTimestamp, false)
+ }
+ }
+ 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.DeletionGracePeriodSeconds != nil {
+ x.DeletionGracePeriodSeconds = nil
+ }
+ } else {
+ if x.DeletionGracePeriodSeconds == nil {
+ x.DeletionGracePeriodSeconds = new(int64)
+ }
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv39 := &x.Labels
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv39, false, 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() {
+ x.Annotations = nil
+ } else {
+ yyv41 := &x.Annotations
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv41, false, 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() {
+ x.OwnerReferences = nil
+ } else {
+ yyv43 := &x.OwnerReferences
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ h.decSliceOwnerReference((*[]OwnerReference)(yyv43), 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() {
+ x.Finalizers = nil
+ } else {
+ yyv45 := &x.Finalizers
+ yym46 := z.DecBinary()
+ _ = yym46
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv45, false, 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 *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 [21]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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(21)
+ } 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)
+ }
+ }
+ }
+ }
+ 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 {
+ x.Name = string(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)
+ }
+ 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 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() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ if x.VolumeSource.HostPath == nil {
+ x.VolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.EmptyDir == nil {
+ x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.AWSElasticBlockStore == nil {
+ x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.GitRepo == nil {
+ x.VolumeSource.GitRepo = new(GitRepoVolumeSource)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.ISCSI == nil {
+ x.VolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.Glusterfs == nil {
+ x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.PersistentVolumeClaim == nil {
+ x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.FlexVolume == nil {
+ x.VolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.Cinder == nil {
+ x.VolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.CephFS == nil {
+ x.VolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.Flocker == nil {
+ x.VolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.DownwardAPI == nil {
+ x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ if x.VolumeSource.AzureFile == nil {
+ x.VolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ 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)
+ }
+ if x.VolumeSource.ConfigMap == nil {
+ x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ 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.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)
+ }
+ 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)
+ }
+ 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 *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 [20]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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(20)
+ } else {
+ 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_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)
+ }
+ 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 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() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.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() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.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() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.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() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.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() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.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() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.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() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.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() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.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() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.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() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.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() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.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() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.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() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.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() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.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() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.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() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.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() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.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() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.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() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.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() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ 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 *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 {
+ x.ClaimName = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.ClaimName = ""
+ } else {
+ x.ClaimName = string(r.DecodeString())
+ }
+ 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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 [14]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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ 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_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)
+ }
+ 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 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.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.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() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.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() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.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() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.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() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.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() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.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() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.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() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.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() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.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() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.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() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.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() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.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() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.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() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PersistentVolumeSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PersistentVolumeStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [18]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Capacity) != 0
+ yyq2[1] = len(x.AccessModes) != 0
+ yyq2[2] = x.ClaimRef != nil
+ yyq2[3] = x.PersistentVolumeReclaimPolicy != ""
+ yyq2[4] = x.PersistentVolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil
+ yyq2[5] = x.PersistentVolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil
+ yyq2[6] = x.PersistentVolumeSource.HostPath != nil && x.HostPath != nil
+ yyq2[7] = x.PersistentVolumeSource.Glusterfs != nil && x.Glusterfs != nil
+ yyq2[8] = x.PersistentVolumeSource.NFS != nil && x.NFS != nil
+ yyq2[9] = x.PersistentVolumeSource.RBD != nil && x.RBD != nil
+ yyq2[10] = x.PersistentVolumeSource.ISCSI != nil && x.ISCSI != nil
+ yyq2[11] = x.PersistentVolumeSource.Cinder != nil && x.Cinder != nil
+ yyq2[12] = x.PersistentVolumeSource.CephFS != nil && x.CephFS != nil
+ yyq2[13] = x.PersistentVolumeSource.FC != nil && x.FC != nil
+ yyq2[14] = x.PersistentVolumeSource.Flocker != nil && x.Flocker != nil
+ yyq2[15] = x.PersistentVolumeSource.FlexVolume != nil && x.FlexVolume != nil
+ yyq2[16] = x.PersistentVolumeSource.AzureFile != nil && x.AzureFile != nil
+ yyq2[17] = x.PersistentVolumeSource.VsphereVolume != nil && x.VsphereVolume != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(18)
+ } else {
+ 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.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.ClaimRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ClaimRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ 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[3] {
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeReclaimPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ }
+ }
+ var yyn15 bool
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ yyn15 = true
+ goto LABEL15
+ }
+ LABEL15:
+ if yyr2 || yy2arr2 {
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn18 bool
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ yyn18 = true
+ goto LABEL18
+ }
+ LABEL18:
+ if yyr2 || yy2arr2 {
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn21 bool
+ if x.PersistentVolumeSource.HostPath == nil {
+ yyn21 = true
+ goto LABEL21
+ }
+ LABEL21:
+ if yyr2 || yy2arr2 {
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn24 bool
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ yyn24 = true
+ goto LABEL24
+ }
+ LABEL24:
+ if yyr2 || yy2arr2 {
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn27 bool
+ if x.PersistentVolumeSource.NFS == nil {
+ yyn27 = true
+ goto LABEL27
+ }
+ LABEL27:
+ if yyr2 || yy2arr2 {
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn30 bool
+ if x.PersistentVolumeSource.RBD == nil {
+ yyn30 = true
+ goto LABEL30
+ }
+ LABEL30:
+ if yyr2 || yy2arr2 {
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn33 bool
+ if x.PersistentVolumeSource.ISCSI == nil {
+ yyn33 = true
+ goto LABEL33
+ }
+ LABEL33:
+ if yyr2 || yy2arr2 {
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn36 bool
+ if x.PersistentVolumeSource.Cinder == nil {
+ yyn36 = true
+ goto LABEL36
+ }
+ LABEL36:
+ if yyr2 || yy2arr2 {
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn39 bool
+ if x.PersistentVolumeSource.CephFS == nil {
+ yyn39 = true
+ goto LABEL39
+ }
+ LABEL39:
+ if yyr2 || yy2arr2 {
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn42 bool
+ if x.PersistentVolumeSource.FC == nil {
+ yyn42 = true
+ goto LABEL42
+ }
+ LABEL42:
+ if yyr2 || yy2arr2 {
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn45 bool
+ if x.PersistentVolumeSource.Flocker == nil {
+ yyn45 = true
+ goto LABEL45
+ }
+ LABEL45:
+ if yyr2 || yy2arr2 {
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ 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 yyn45 {
+ r.EncodeNil()
+ } else {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn48 bool
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ yyn48 = true
+ goto LABEL48
+ }
+ LABEL48:
+ if yyr2 || yy2arr2 {
+ if yyn48 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn48 {
+ r.EncodeNil()
+ } else {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn51 bool
+ if x.PersistentVolumeSource.AzureFile == nil {
+ yyn51 = true
+ goto LABEL51
+ }
+ LABEL51:
+ if yyr2 || yy2arr2 {
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn54 bool
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ yyn54 = true
+ goto LABEL54
+ }
+ LABEL54:
+ if yyr2 || yy2arr2 {
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ 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 "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv5 := &x.AccessModes
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv5), 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 {
+ x.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(r.DecodeString())
+ }
+ 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)
+ }
+ 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 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.Capacity = nil
+ } else {
+ yyv24 := &x.Capacity
+ yyv24.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.AccessModes = nil
+ } else {
+ yyv25 := &x.AccessModes
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv25), 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() {
+ if x.ClaimRef != nil {
+ x.ClaimRef = nil
+ }
+ } else {
+ if x.ClaimRef == nil {
+ x.ClaimRef = new(ObjectReference)
+ }
+ x.ClaimRef.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.PersistentVolumeReclaimPolicy = ""
+ } else {
+ x.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(r.DecodeString())
+ }
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.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 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 {
+ x.Phase = PersistentVolumePhase(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(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 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.Phase = ""
+ } else {
+ x.Phase = PersistentVolumePhase(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.Message = ""
+ } else {
+ x.Message = string(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.Reason = ""
+ } else {
+ x.Reason = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePersistentVolume((*[]PersistentVolume)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePersistentVolume((*[]PersistentVolume)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeClaimSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PersistentVolumeClaimSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]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 != ""
+ 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.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_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_unversioned.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 {
+ x.VolumeName = string(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 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.AccessModes = nil
+ } else {
+ yyv11 := &x.AccessModes
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.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() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv15 := &x.Resources
+ 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.VolumeName = ""
+ } else {
+ x.VolumeName = string(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 *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 {
+ x.Phase = PersistentVolumeClaimPhase(r.DecodeString())
+ }
+ 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 {
+ x.Phase = PersistentVolumeClaimPhase(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.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 {
+ x.Path = string(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 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.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ 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 *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 [1]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Medium != ""
+ 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.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_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 {
+ x.Medium = StorageMedium(r.DecodeString())
+ }
+ 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 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.Medium = ""
+ } else {
+ x.Medium = StorageMedium(r.DecodeString())
+ }
+ 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 *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 {
+ x.EndpointsName = string(r.DecodeString())
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.EndpointsName = ""
+ } else {
+ x.EndpointsName = string(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.Path = ""
+ } else {
+ x.Path = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 {
+ x.RBDImage = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "pool":
+ if r.TryDecodeAsNil() {
+ x.RBDPool = ""
+ } else {
+ x.RBDPool = string(r.DecodeString())
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.RadosUser = ""
+ } else {
+ x.RadosUser = string(r.DecodeString())
+ }
+ case "keyring":
+ if r.TryDecodeAsNil() {
+ x.Keyring = ""
+ } else {
+ x.Keyring = string(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 {
+ x.ReadOnly = bool(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 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.CephMonitors = nil
+ } else {
+ yyv14 := &x.CephMonitors
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv14, 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.RBDImage = ""
+ } else {
+ x.RBDImage = string(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 {
+ x.FSType = string(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.RBDPool = ""
+ } else {
+ x.RBDPool = string(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.RadosUser = ""
+ } else {
+ x.RadosUser = string(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.Keyring = ""
+ } else {
+ x.Keyring = string(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 {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 {
+ x.VolumeID = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.VolumeID = ""
+ } else {
+ x.VolumeID = string(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.FSType = ""
+ } else {
+ x.FSType = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ x.User = string(r.DecodeString())
+ }
+ case "secretFile":
+ if r.TryDecodeAsNil() {
+ x.SecretFile = ""
+ } else {
+ x.SecretFile = string(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 {
+ x.ReadOnly = bool(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 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.Monitors = nil
+ } else {
+ yyv12 := &x.Monitors
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, 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() {
+ x.Path = ""
+ } else {
+ x.Path = string(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.User = ""
+ } else {
+ x.User = string(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.SecretFile = ""
+ } else {
+ x.SecretFile = string(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.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 [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.DatasetName))
+ }
+ } else {
+ 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_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 {
+ x.DatasetName = string(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 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.DatasetName = ""
+ } else {
+ x.DatasetName = string(r.DecodeString())
+ }
+ 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 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 {
+ x.PDName = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ x.Partition = int32(r.DecodeInt(32))
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.PDName = ""
+ } else {
+ x.PDName = string(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 {
+ x.FSType = string(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.Partition = 0
+ } else {
+ x.Partition = 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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 *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 {
+ x.Driver = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(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 {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ case "options":
+ if r.TryDecodeAsNil() {
+ x.Options = nil
+ } else {
+ yyv8 := &x.Options
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv8, 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 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.Driver = ""
+ } else {
+ x.Driver = string(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 {
+ x.FSType = string(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.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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.Options = nil
+ } else {
+ yyv15 := &x.Options
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecMapStringStringX(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 *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 {
+ x.VolumeID = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ x.Partition = int32(r.DecodeInt(32))
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.VolumeID = ""
+ } else {
+ x.VolumeID = string(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 {
+ x.FSType = string(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.Partition = 0
+ } else {
+ x.Partition = 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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 *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 {
+ x.Repository = string(r.DecodeString())
+ }
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = ""
+ } else {
+ x.Revision = string(r.DecodeString())
+ }
+ case "directory":
+ if r.TryDecodeAsNil() {
+ x.Directory = ""
+ } else {
+ x.Directory = string(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 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.Repository = ""
+ } else {
+ x.Repository = string(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.Revision = ""
+ } else {
+ x.Revision = string(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.Directory = ""
+ } else {
+ x.Directory = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.SecretName != ""
+ yyq2[1] = len(x.Items) != 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.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_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 {
+ x.SecretName = string(r.DecodeString())
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv5 := &x.Items
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv5), d)
+ }
+ }
+ 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 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.SecretName = ""
+ } else {
+ x.SecretName = string(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.Items = nil
+ } else {
+ yyv9 := &x.Items
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(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 *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 {
+ x.Server = string(r.DecodeString())
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.Server = ""
+ } else {
+ x.Server = string(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.Path = ""
+ } else {
+ x.Path = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 [6]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[3] = x.ISCSIInterface != ""
+ yyq2[4] = x.FSType != ""
+ yyq2[5] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } 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_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 {
+ x.TargetPortal = string(r.DecodeString())
+ }
+ case "iqn":
+ if r.TryDecodeAsNil() {
+ x.IQN = ""
+ } else {
+ x.IQN = string(r.DecodeString())
+ }
+ case "lun":
+ if r.TryDecodeAsNil() {
+ x.Lun = 0
+ } else {
+ x.Lun = int32(r.DecodeInt(32))
+ }
+ case "iscsiInterface":
+ if r.TryDecodeAsNil() {
+ x.ISCSIInterface = ""
+ } else {
+ x.ISCSIInterface = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 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.TargetPortal = ""
+ } else {
+ x.TargetPortal = string(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.IQN = ""
+ } else {
+ x.IQN = string(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.Lun = 0
+ } else {
+ x.Lun = 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.ISCSIInterface = ""
+ } else {
+ x.ISCSIInterface = string(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 {
+ x.FSType = string(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 {
+ x.ReadOnly = bool(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 *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 {
+ x.FSType = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.TargetWWNs = nil
+ } else {
+ yyv11 := &x.TargetWWNs
+ 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() {
+ if x.Lun != nil {
+ x.Lun = nil
+ }
+ } else {
+ if x.Lun == nil {
+ x.Lun = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.Lun)) = 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.FSType = ""
+ } else {
+ x.FSType = string(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 {
+ x.ReadOnly = bool(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 *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 {
+ x.SecretName = string(r.DecodeString())
+ }
+ case "shareName":
+ if r.TryDecodeAsNil() {
+ x.ShareName = ""
+ } else {
+ x.ShareName = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(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 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.SecretName = ""
+ } else {
+ x.SecretName = string(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.ShareName = ""
+ } else {
+ x.ShareName = string(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.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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 *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 [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.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_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 {
+ x.VolumePath = string(r.DecodeString())
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ x.FSType = string(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 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.VolumePath = ""
+ } else {
+ x.VolumePath = string(r.DecodeString())
+ }
+ 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.FSType = ""
+ } else {
+ x.FSType = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Items) != 0
+ yyq2[1] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(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.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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 *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 "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv4), d)
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 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.Items = nil
+ } else {
+ yyv8 := &x.Items
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv8), 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.Name = ""
+ } else {
+ x.Name = string(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 *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 [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.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_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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ 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 {
+ x.Path = string(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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "hostPort":
+ if r.TryDecodeAsNil() {
+ x.HostPort = 0
+ } else {
+ x.HostPort = int32(r.DecodeInt(32))
+ }
+ case "containerPort":
+ if r.TryDecodeAsNil() {
+ x.ContainerPort = 0
+ } else {
+ x.ContainerPort = int32(r.DecodeInt(32))
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ x.Protocol = Protocol(r.DecodeString())
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ x.HostIP = string(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 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 {
+ x.Name = string(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.HostPort = 0
+ } else {
+ x.HostPort = 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.ContainerPort = 0
+ } else {
+ x.ContainerPort = 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 {
+ x.Protocol = Protocol(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.HostIP = ""
+ } else {
+ x.HostIP = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ case "mountPath":
+ if r.TryDecodeAsNil() {
+ x.MountPath = ""
+ } else {
+ x.MountPath = string(r.DecodeString())
+ }
+ case "subPath":
+ if r.TryDecodeAsNil() {
+ x.SubPath = ""
+ } else {
+ x.SubPath = string(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 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 {
+ x.Name = string(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 {
+ x.ReadOnly = bool(r.DecodeBool())
+ }
+ 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.MountPath = ""
+ } else {
+ x.MountPath = string(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.SubPath = ""
+ } else {
+ x.SubPath = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(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 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 {
+ x.Name = string(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.Value = ""
+ } else {
+ x.Value = string(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() {
+ if x.ValueFrom != nil {
+ x.ValueFrom = nil
+ }
+ } else {
+ if x.ValueFrom == nil {
+ x.ValueFrom = new(EnvVarSource)
+ }
+ x.ValueFrom.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 *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 {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 *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 {
+ x.ContainerName = string(r.DecodeString())
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ x.Resource = string(r.DecodeString())
+ }
+ case "divisor":
+ if r.TryDecodeAsNil() {
+ x.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.Divisor
+ 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 *ResourceFieldSelector) 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.ContainerName = ""
+ } else {
+ x.ContainerName = string(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.Resource = ""
+ } else {
+ x.Resource = string(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.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.Divisor
+ 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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Name != ""
+ 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.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.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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 *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 "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ 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 {
+ x.Name = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Name != ""
+ 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.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.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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 *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 "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(r.DecodeString())
+ }
+ 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 {
+ x.Name = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(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 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 {
+ x.Name = string(r.DecodeString())
+ }
+ 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.Value = ""
+ } else {
+ x.Value = string(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 *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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv5 := &x.Port
+ 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)
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ x.Host = string(r.DecodeString())
+ }
+ case "scheme":
+ if r.TryDecodeAsNil() {
+ x.Scheme = ""
+ } else {
+ x.Scheme = URIScheme(r.DecodeString())
+ }
+ case "httpHeaders":
+ if r.TryDecodeAsNil() {
+ x.HTTPHeaders = nil
+ } else {
+ yyv9 := &x.HTTPHeaders
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(yyv9), 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 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.Path = ""
+ } else {
+ x.Path = string(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.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv13 := &x.Port
+ 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)
+ }
+ }
+ 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.Host = ""
+ } else {
+ x.Host = string(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.Scheme = ""
+ } else {
+ x.Scheme = URIScheme(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.HTTPHeaders = nil
+ } else {
+ yyv17 := &x.HTTPHeaders
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(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 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 [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)
+ 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_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)
+ }
+ }
+ 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 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 = pkg4_intstr.IntOrString{}
+ } else {
+ yyv7 := &x.Port
+ 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)
+ }
+ }
+ 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 *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.InitialDelaySeconds != 0
+ yyq2[1] = x.TimeoutSeconds != 0
+ yyq2[2] = x.PeriodSeconds != 0
+ yyq2[3] = x.SuccessThreshold != 0
+ yyq2[4] = x.FailureThreshold != 0
+ yyq2[5] = x.Handler.Exec != nil && x.Exec != nil
+ yyq2[6] = x.Handler.HTTPGet != nil && x.HTTPGet != nil
+ yyq2[7] = x.Handler.TCPSocket != nil && x.TCPSocket != 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.InitialDelaySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initialDelaySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.InitialDelaySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("periodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("successThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failureThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ }
+ }
+ var yyn18 bool
+ if x.Handler.Exec == nil {
+ yyn18 = true
+ goto LABEL18
+ }
+ LABEL18:
+ if yyr2 || yy2arr2 {
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn21 bool
+ if x.Handler.HTTPGet == nil {
+ yyn21 = true
+ goto LABEL21
+ }
+ LABEL21:
+ if yyr2 || yy2arr2 {
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpGet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn24 bool
+ if x.Handler.TCPSocket == nil {
+ yyn24 = true
+ goto LABEL24
+ }
+ LABEL24:
+ if yyr2 || yy2arr2 {
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tcpSocket"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ 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 *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 "initialDelaySeconds":
+ if r.TryDecodeAsNil() {
+ x.InitialDelaySeconds = 0
+ } else {
+ x.InitialDelaySeconds = int32(r.DecodeInt(32))
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ x.TimeoutSeconds = 0
+ } else {
+ x.TimeoutSeconds = int32(r.DecodeInt(32))
+ }
+ case "periodSeconds":
+ if r.TryDecodeAsNil() {
+ x.PeriodSeconds = 0
+ } else {
+ x.PeriodSeconds = int32(r.DecodeInt(32))
+ }
+ case "successThreshold":
+ if r.TryDecodeAsNil() {
+ x.SuccessThreshold = 0
+ } else {
+ x.SuccessThreshold = int32(r.DecodeInt(32))
+ }
+ case "failureThreshold":
+ if r.TryDecodeAsNil() {
+ x.FailureThreshold = 0
+ } else {
+ x.FailureThreshold = int32(r.DecodeInt(32))
+ }
+ 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)
+ }
+ 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 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.InitialDelaySeconds = 0
+ } else {
+ x.InitialDelaySeconds = 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.TimeoutSeconds = 0
+ } else {
+ x.TimeoutSeconds = 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.PeriodSeconds = 0
+ } else {
+ x.PeriodSeconds = 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.SuccessThreshold = 0
+ } else {
+ x.SuccessThreshold = 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.FailureThreshold = 0
+ } else {
+ x.FailureThreshold = int32(r.DecodeInt(32))
+ }
+ if x.Handler.Exec == nil {
+ x.Handler.Exec = new(ExecAction)
+ }
+ 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.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)
+ }
+ 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.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)
+ }
+ 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.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.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 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 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 [18]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Image != ""
+ 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.Env) != 0
+ yyq2[7] = true
+ yyq2[8] = len(x.VolumeMounts) != 0
+ yyq2[9] = x.LivenessProbe != nil
+ yyq2[10] = x.ReadinessProbe != nil
+ yyq2[11] = x.Lifecycle != nil
+ yyq2[12] = x.TerminationMessagePath != ""
+ yyq2[13] = x.ImagePullPolicy != ""
+ yyq2[14] = x.SecurityContext != nil
+ yyq2[15] = x.Stdin != false
+ yyq2[16] = x.StdinOnce != false
+ yyq2[17] = x.TTY != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(18)
+ } 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.Image))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("env"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yy25 := &x.Resources
+ yy25.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy27 := &x.Resources
+ yy27.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeMounts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.LivenessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.LivenessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ 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[10] {
+ if x.ReadinessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.ReadinessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ 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[11] {
+ if x.Lifecycle == nil {
+ r.EncodeNil()
+ } else {
+ x.Lifecycle.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ 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[12] {
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ x.ImagePullPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[13] {
+ 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[14] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ 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[15] {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ yym54 := z.EncBinary()
+ _ = yym54
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdinOnce"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym55 := z.EncBinary()
+ _ = yym55
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym57 := z.EncBinary()
+ _ = yym57
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym58 := z.EncBinary()
+ _ = yym58
+ 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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv6 := &x.Command
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "args":
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv8 := &x.Args
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "workingDir":
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ x.WorkingDir = string(r.DecodeString())
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv11 := &x.Ports
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv11), d)
+ }
+ }
+ case "env":
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv13 := &x.Env
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv13), d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv15 := &x.Resources
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "volumeMounts":
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv16 := &x.VolumeMounts
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv16), 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 {
+ x.TerminationMessagePath = string(r.DecodeString())
+ }
+ case "imagePullPolicy":
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ x.ImagePullPolicy = PullPolicy(r.DecodeString())
+ }
+ 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 {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ case "stdinOnce":
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ x.StdinOnce = bool(r.DecodeBool())
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(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 yyj27 int
+ var yyb27 bool
+ var yyhl27 bool = l >= 0
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv30 := &x.Command
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv30, false, d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv32 := &x.Args
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv32, false, d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ x.WorkingDir = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv35 := &x.Ports
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv35), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv37 := &x.Env
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv37), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv39 := &x.Resources
+ yyv39.CodecDecodeSelf(d)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv40 := &x.VolumeMounts
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv40), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePath = ""
+ } else {
+ x.TerminationMessagePath = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ x.ImagePullPolicy = PullPolicy(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ x.StdinOnce = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ for {
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj27-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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ 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.Message = ""
+ } else {
+ x.Message = string(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 *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_unversioned.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_unversioned.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 {
+ x.ExitCode = int32(r.DecodeInt(32))
+ }
+ case "signal":
+ if r.TryDecodeAsNil() {
+ x.Signal = 0
+ } else {
+ x.Signal = int32(r.DecodeInt(32))
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "startedAt":
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv8 := &x.StartedAt
+ 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 "finishedAt":
+ if r.TryDecodeAsNil() {
+ x.FinishedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv10 := &x.FinishedAt
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv10) {
+ } else if yym11 {
+ z.DecBinaryUnmarshal(yyv10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv10)
+ } else {
+ z.DecFallback(yyv10, false)
+ }
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 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.ExitCode = 0
+ } else {
+ x.ExitCode = 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.Signal = 0
+ } else {
+ x.Signal = 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.Reason = ""
+ } else {
+ x.Reason = string(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.Message = ""
+ } else {
+ x.Message = string(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.StartedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv18 := &x.StartedAt
+ 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)
+ }
+ }
+ 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.FinishedAt = pkg2_unversioned.Time{}
+ } else {
+ yyv20 := &x.FinishedAt
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv20) {
+ } else if yym21 {
+ z.DecBinaryUnmarshal(yyv20)
+ } else if !yym21 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv20)
+ } else {
+ z.DecFallback(yyv20, 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.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "state":
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv5 := &x.State
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastState":
+ if r.TryDecodeAsNil() {
+ x.LastTerminationState = ContainerState{}
+ } else {
+ yyv6 := &x.LastTerminationState
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "ready":
+ if r.TryDecodeAsNil() {
+ x.Ready = false
+ } else {
+ x.Ready = bool(r.DecodeBool())
+ }
+ case "restartCount":
+ if r.TryDecodeAsNil() {
+ x.RestartCount = 0
+ } else {
+ x.RestartCount = int32(r.DecodeInt(32))
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ case "imageID":
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ x.ImageID = string(r.DecodeString())
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 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 {
+ x.Name = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv14 := &x.State
+ 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.LastTerminationState = ContainerState{}
+ } else {
+ yyv15 := &x.LastTerminationState
+ 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.Ready = false
+ } else {
+ x.Ready = bool(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.RestartCount = 0
+ } else {
+ x.RestartCount = 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.Image = ""
+ } else {
+ x.Image = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ x.ImageID = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ x.ContainerID = string(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 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 {
+ x.Type = PodConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = PodConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastProbeTime
+ 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.LastTransitionTime = pkg2_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = NodeSelectorOperator(r.DecodeString())
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv6 := &x.Values
+ 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 *NodeSelectorRequirement) 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = NodeSelectorOperator(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.Values = nil
+ } else {
+ yyv11 := &x.Values
+ 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 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 {
+ x.Weight = int32(r.DecodeInt(32))
+ }
+ case "podAffinityTerm":
+ if r.TryDecodeAsNil() {
+ x.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv5 := &x.PodAffinityTerm
+ yyv5.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 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.Weight = 0
+ } else {
+ x.Weight = int32(r.DecodeInt(32))
+ }
+ 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.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv8 := &x.PodAffinityTerm
+ 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 *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[2] = x.TopologyKey != ""
+ 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] {
+ 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 x.Namespaces == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Namespaces, false, e)
+ }
+ }
+ } else {
+ 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_unversioned.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 {
+ x.TopologyKey = string(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 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.LabelSelector != nil {
+ x.LabelSelector = nil
+ }
+ } else {
+ if x.LabelSelector == nil {
+ x.LabelSelector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LabelSelector) {
+ } else {
+ z.DecFallback(x.LabelSelector, false)
+ }
+ }
+ 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.Namespaces = nil
+ } else {
+ yyv12 := &x.Namespaces
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, 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.TopologyKey = ""
+ } else {
+ x.TopologyKey = string(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 *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 {
+ x.Weight = int32(r.DecodeInt(32))
+ }
+ case "preference":
+ if r.TryDecodeAsNil() {
+ x.Preference = NodeSelectorTerm{}
+ } else {
+ yyv5 := &x.Preference
+ yyv5.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 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.Weight = 0
+ } else {
+ x.Weight = int32(r.DecodeInt(32))
+ }
+ 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.Preference = NodeSelectorTerm{}
+ } else {
+ yyv8 := &x.Preference
+ 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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Value != ""
+ 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)
+ 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_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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(r.DecodeString())
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ x.Effect = TaintEffect(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(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.Value = ""
+ } else {
+ x.Value = string(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.Effect = ""
+ } else {
+ x.Effect = TaintEffect(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 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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Key != ""
+ yyq2[1] = x.Operator != ""
+ yyq2[2] = x.Value != ""
+ yyq2[3] = x.Effect != ""
+ 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.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_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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = TolerationOperator(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ x.Value = string(r.DecodeString())
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ x.Effect = TaintEffect(r.DecodeString())
+ }
+ 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 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = TolerationOperator(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 {
+ x.Value = string(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.Effect = ""
+ } else {
+ x.Effect = TaintEffect(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 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 [17]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Volumes) != 0
+ yyq2[2] = x.RestartPolicy != ""
+ yyq2[3] = x.TerminationGracePeriodSeconds != nil
+ yyq2[4] = x.ActiveDeadlineSeconds != nil
+ yyq2[5] = x.DNSPolicy != ""
+ yyq2[6] = len(x.NodeSelector) != 0
+ yyq2[7] = x.ServiceAccountName != ""
+ yyq2[8] = x.DeprecatedServiceAccount != ""
+ yyq2[9] = x.NodeName != ""
+ yyq2[10] = x.HostNetwork != false
+ yyq2[11] = x.HostPID != false
+ yyq2[12] = x.HostIPC != false
+ yyq2[13] = x.SecurityContext != nil
+ yyq2[14] = len(x.ImagePullSecrets) != 0
+ yyq2[15] = x.Hostname != ""
+ yyq2[16] = x.Subdomain != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(17)
+ } 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 x.Containers == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ 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 {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.Containers), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.RestartPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ 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[3] {
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy13 := *x.TerminationGracePeriodSeconds
+ 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("terminationGracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.TerminationGracePeriodSeconds
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.ActiveDeadlineSeconds
+ 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("activeDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.ActiveDeadlineSeconds
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.DNSPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ 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[6] {
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetwork"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ 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[14] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym54 := z.EncBinary()
+ _ = yym54
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ yym56 := z.EncBinary()
+ _ = yym56
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subdomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym57 := z.EncBinary()
+ _ = yym57
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ }
+ }
+ 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 "containers":
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv6 := &x.Containers
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv6), d)
+ }
+ }
+ case "restartPolicy":
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ x.RestartPolicy = RestartPolicy(r.DecodeString())
+ }
+ case "terminationGracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ 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)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "dnsPolicy":
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ x.DNSPolicy = DNSPolicy(r.DecodeString())
+ }
+ case "nodeSelector":
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv14 := &x.NodeSelector
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv14, false, d)
+ }
+ }
+ case "serviceAccountName":
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ x.ServiceAccountName = string(r.DecodeString())
+ }
+ case "serviceAccount":
+ if r.TryDecodeAsNil() {
+ x.DeprecatedServiceAccount = ""
+ } else {
+ x.DeprecatedServiceAccount = string(r.DecodeString())
+ }
+ case "nodeName":
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ x.NodeName = string(r.DecodeString())
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(r.DecodeBool())
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ x.HostPID = bool(r.DecodeBool())
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ x.HostIPC = bool(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 {
+ yyv23 := &x.ImagePullSecrets
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv23), d)
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(r.DecodeString())
+ }
+ case "subdomain":
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ x.Subdomain = string(r.DecodeString())
+ }
+ 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 yyj27 int
+ var yyb27 bool
+ var yyhl27 bool = l >= 0
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv28 := &x.Volumes
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.decSliceVolume((*[]Volume)(yyv28), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv30 := &x.Containers
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv30), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ x.RestartPolicy = RestartPolicy(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ x.DNSPolicy = DNSPolicy(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv38 := &x.NodeSelector
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv38, false, d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ x.ServiceAccountName = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DeprecatedServiceAccount = ""
+ } else {
+ x.DeprecatedServiceAccount = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ x.NodeName = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ x.HostPID = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ x.HostIPC = bool(r.DecodeBool())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ 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)
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv47 := &x.ImagePullSecrets
+ yym48 := z.DecBinary()
+ _ = yym48
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv47), d)
+ }
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(r.DecodeString())
+ }
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ x.Subdomain = string(r.DecodeString())
+ }
+ for {
+ yyj27++
+ if yyhl27 {
+ yyb27 = yyj27 > l
+ } else {
+ yyb27 = r.CheckBreak()
+ }
+ if yyb27 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj27-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 *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 [8]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.ContainerStatuses) != 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
+ }
+ 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.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerStatuses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), 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 {
+ x.Phase = PodPhase(r.DecodeString())
+ }
+ 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 {
+ x.Message = string(r.DecodeString())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ x.HostIP = string(r.DecodeString())
+ }
+ case "podIP":
+ if r.TryDecodeAsNil() {
+ x.PodIP = ""
+ } else {
+ x.PodIP = string(r.DecodeString())
+ }
+ case "startTime":
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_unversioned.Time)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ case "containerStatuses":
+ if r.TryDecodeAsNil() {
+ x.ContainerStatuses = nil
+ } else {
+ yyv13 := &x.ContainerStatuses
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv13), 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 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.Phase = ""
+ } else {
+ x.Phase = PodPhase(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.Conditions = nil
+ } else {
+ yyv17 := &x.Conditions
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSlicePodCondition((*[]PodCondition)(yyv17), 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.Message = ""
+ } else {
+ x.Message = string(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.Reason = ""
+ } else {
+ x.Reason = string(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.HostIP = ""
+ } else {
+ x.HostIP = string(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.PodIP = ""
+ } else {
+ x.PodIP = string(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.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_unversioned.Time)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym24 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, 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.ContainerStatuses = nil
+ } else {
+ yyv25 := &x.ContainerStatuses
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv25), 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Status = PodStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PodSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PodStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePod(([]Pod)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePod((*[]Pod)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePod((*[]Pod)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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 = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv7 := &x.ObjectMeta
+ 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.Spec = PodSpec{}
+ } else {
+ yyv8 := &x.Spec
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Template
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Template
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = PodTemplateSpec{}
+ } else {
+ yyv5 := &x.Template
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Template = PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodTemplate(([]PodTemplate)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodTemplate((*[]PodTemplate)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodTemplate((*[]PodTemplate)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != nil
+ yyq2[1] = len(x.Selector) != 0
+ yyq2[2] = x.Template != 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.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 {
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Template == nil {
+ r.EncodeNil()
+ } else {
+ x.Template.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ 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 "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 "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 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.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = 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.Selector = nil
+ } else {
+ yyv12 := &x.Selector
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, false, 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.Template != nil {
+ x.Template = nil
+ }
+ } else {
+ if x.Template == nil {
+ x.Template = new(PodTemplateSpec)
+ }
+ x.Template.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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ObservedGeneration != 0
+ 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] {
+ 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.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = int32(r.DecodeInt(32))
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 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.Replicas = 0
+ } else {
+ x.Replicas = 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.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = 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.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicationControllerSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicationControllerStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ReplicationControllerSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ReplicationControllerStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceReplicationController(([]ReplicationController)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceReplicationController((*[]ReplicationController)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceReplicationController((*[]ReplicationController)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 *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 {
+ x.IP = string(r.DecodeString())
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(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 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.IP = ""
+ } else {
+ x.IP = string(r.DecodeString())
+ }
+ 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.Hostname = ""
+ } else {
+ x.Hostname = string(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 *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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = len(x.Selector) != 0
+ yyq2[2] = x.ClusterIP != ""
+ yyq2[3] = x.Type != ""
+ yyq2[4] = len(x.ExternalIPs) != 0
+ yyq2[5] = len(x.DeprecatedPublicIPs) != 0
+ yyq2[6] = x.SessionAffinity != ""
+ yyq2[7] = x.LoadBalancerIP != ""
+ yyq2[8] = len(x.LoadBalancerSourceRanges) != 0
+ 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 x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ } else {
+ 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] {
+ if x.DeprecatedPublicIPs == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.DeprecatedPublicIPs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deprecatedPublicIPs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeprecatedPublicIPs == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.DeprecatedPublicIPs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ x.SessionAffinity.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ 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[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.LoadBalancerSourceRanges == nil {
+ r.EncodeNil()
+ } else {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerSourceRanges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LoadBalancerSourceRanges == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e)
+ }
+ }
+ }
+ }
+ 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 {
+ x.ClusterIP = string(r.DecodeString())
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = ServiceType(r.DecodeString())
+ }
+ case "externalIPs":
+ if r.TryDecodeAsNil() {
+ x.ExternalIPs = nil
+ } else {
+ yyv10 := &x.ExternalIPs
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "deprecatedPublicIPs":
+ if r.TryDecodeAsNil() {
+ x.DeprecatedPublicIPs = nil
+ } else {
+ yyv12 := &x.DeprecatedPublicIPs
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ case "sessionAffinity":
+ if r.TryDecodeAsNil() {
+ x.SessionAffinity = ""
+ } else {
+ x.SessionAffinity = ServiceAffinity(r.DecodeString())
+ }
+ case "loadBalancerIP":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerIP = ""
+ } else {
+ x.LoadBalancerIP = string(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)
+ }
+ }
+ 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 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.Ports = nil
+ } else {
+ yyv19 := &x.Ports
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv19), 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.Selector = nil
+ } else {
+ yyv21 := &x.Selector
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv21, false, 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.ClusterIP = ""
+ } else {
+ x.ClusterIP = string(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.Type = ""
+ } else {
+ x.Type = ServiceType(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.ExternalIPs = nil
+ } else {
+ yyv25 := &x.ExternalIPs
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv25, false, 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.DeprecatedPublicIPs = nil
+ } else {
+ yyv27 := &x.DeprecatedPublicIPs
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv27, false, 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.SessionAffinity = ""
+ } else {
+ x.SessionAffinity = ServiceAffinity(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.LoadBalancerIP = ""
+ } else {
+ x.LoadBalancerIP = string(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.LoadBalancerSourceRanges = nil
+ } else {
+ yyv31 := &x.LoadBalancerSourceRanges
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv31, false, d)
+ }
+ }
+ 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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ x.Protocol = Protocol(r.DecodeString())
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ case "targetPort":
+ if r.TryDecodeAsNil() {
+ x.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv7 := &x.TargetPort
+ 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)
+ }
+ }
+ case "nodePort":
+ if r.TryDecodeAsNil() {
+ x.NodePort = 0
+ } else {
+ x.NodePort = 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 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 {
+ x.Name = string(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.Protocol = ""
+ } else {
+ x.Protocol = Protocol(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.Port = 0
+ } else {
+ x.Port = 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.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv14 := &x.TargetPort
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv14)
+ } else {
+ z.DecFallback(yyv14, 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.NodePort = 0
+ } else {
+ x.NodePort = 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ServiceSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ServiceStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ServiceSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ServiceStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceService(([]Service)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceService((*[]Service)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceService((*[]Service)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = len(x.Secrets) != 0
+ yyq2[2] = len(x.ImagePullSecrets) != 0
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "secrets":
+ if r.TryDecodeAsNil() {
+ x.Secrets = nil
+ } else {
+ yyv5 := &x.Secrets
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv5), d)
+ }
+ }
+ case "imagePullSecrets":
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv7 := &x.ImagePullSecrets
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv7), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv12 := &x.ObjectMeta
+ 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.Secrets = nil
+ } else {
+ yyv13 := &x.Secrets
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv13), 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.ImagePullSecrets = nil
+ } else {
+ yyv15 := &x.ImagePullSecrets
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv15), 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceServiceAccount((*[]ServiceAccount)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceServiceAccount((*[]ServiceAccount)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Subsets == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "subsets":
+ if r.TryDecodeAsNil() {
+ x.Subsets = nil
+ } else {
+ yyv5 := &x.Subsets
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(yyv5), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Subsets = nil
+ } else {
+ yyv11 := &x.Subsets
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Hostname != ""
+ yyq2[2] = x.TargetRef != 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.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.TargetRef == nil {
+ r.EncodeNil()
+ } else {
+ x.TargetRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ 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 {
+ x.IP = string(r.DecodeString())
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ x.Hostname = string(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 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.IP = ""
+ } else {
+ x.IP = string(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.Hostname = ""
+ } else {
+ x.Hostname = string(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() {
+ if x.TargetRef != nil {
+ x.TargetRef = nil
+ }
+ } else {
+ if x.TargetRef == nil {
+ x.TargetRef = new(ObjectReference)
+ }
+ x.TargetRef.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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ x.Protocol = Protocol(r.DecodeString())
+ }
+ 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 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 {
+ x.Name = string(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.Port = 0
+ } else {
+ x.Port = 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.Protocol = ""
+ } else {
+ x.Protocol = Protocol(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpoints(([]Endpoints)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceEndpoints((*[]Endpoints)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEndpoints((*[]Endpoints)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]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
+ 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.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_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 {
+ x.PodCIDR = string(r.DecodeString())
+ }
+ case "externalID":
+ if r.TryDecodeAsNil() {
+ x.ExternalID = ""
+ } else {
+ x.ExternalID = string(r.DecodeString())
+ }
+ case "providerID":
+ if r.TryDecodeAsNil() {
+ x.ProviderID = ""
+ } else {
+ x.ProviderID = string(r.DecodeString())
+ }
+ case "unschedulable":
+ if r.TryDecodeAsNil() {
+ x.Unschedulable = false
+ } else {
+ x.Unschedulable = bool(r.DecodeBool())
+ }
+ 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 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.PodCIDR = ""
+ } else {
+ x.PodCIDR = string(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.ExternalID = ""
+ } else {
+ x.ExternalID = string(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.ProviderID = ""
+ } else {
+ x.ProviderID = string(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.Unschedulable = false
+ } else {
+ x.Unschedulable = bool(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 *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 {
+ x.Port = 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 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.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ 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 *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 {
+ x.MachineID = string(r.DecodeString())
+ }
+ case "systemUUID":
+ if r.TryDecodeAsNil() {
+ x.SystemUUID = ""
+ } else {
+ x.SystemUUID = string(r.DecodeString())
+ }
+ case "bootID":
+ if r.TryDecodeAsNil() {
+ x.BootID = ""
+ } else {
+ x.BootID = string(r.DecodeString())
+ }
+ case "kernelVersion":
+ if r.TryDecodeAsNil() {
+ x.KernelVersion = ""
+ } else {
+ x.KernelVersion = string(r.DecodeString())
+ }
+ case "osImage":
+ if r.TryDecodeAsNil() {
+ x.OSImage = ""
+ } else {
+ x.OSImage = string(r.DecodeString())
+ }
+ case "containerRuntimeVersion":
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntimeVersion = ""
+ } else {
+ x.ContainerRuntimeVersion = string(r.DecodeString())
+ }
+ case "kubeletVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeletVersion = ""
+ } else {
+ x.KubeletVersion = string(r.DecodeString())
+ }
+ case "kubeProxyVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeProxyVersion = ""
+ } else {
+ x.KubeProxyVersion = string(r.DecodeString())
+ }
+ case "operatingSystem":
+ if r.TryDecodeAsNil() {
+ x.OperatingSystem = ""
+ } else {
+ x.OperatingSystem = string(r.DecodeString())
+ }
+ case "architecture":
+ if r.TryDecodeAsNil() {
+ x.Architecture = ""
+ } else {
+ x.Architecture = string(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 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.MachineID = ""
+ } else {
+ x.MachineID = string(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.SystemUUID = ""
+ } else {
+ x.SystemUUID = string(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.BootID = ""
+ } else {
+ x.BootID = string(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.KernelVersion = ""
+ } else {
+ x.KernelVersion = string(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.OSImage = ""
+ } else {
+ x.OSImage = string(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.ContainerRuntimeVersion = ""
+ } else {
+ x.ContainerRuntimeVersion = string(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.KubeletVersion = ""
+ } else {
+ x.KubeletVersion = string(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.KubeProxyVersion = ""
+ } else {
+ x.KubeProxyVersion = string(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.OperatingSystem = ""
+ } else {
+ x.OperatingSystem = string(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.Architecture = ""
+ } else {
+ x.Architecture = string(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 *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 {
+ x.Phase = NodePhase(r.DecodeString())
+ }
+ 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 {
+ x.Phase = NodePhase(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.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 {
+ x.Name = UniqueVolumeName(r.DecodeString())
+ }
+ case "devicePath":
+ if r.TryDecodeAsNil() {
+ x.DevicePath = ""
+ } else {
+ x.DevicePath = string(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 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 {
+ x.Name = UniqueVolumeName(r.DecodeString())
+ }
+ 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.DevicePath = ""
+ } else {
+ x.DevicePath = string(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 *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 {
+ x.SizeBytes = 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 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.Names = nil
+ } else {
+ yyv8 := &x.Names
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, 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.SizeBytes = 0
+ } else {
+ x.SizeBytes = int64(r.DecodeInt(64))
+ }
+ 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 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 {
+ x.Type = NodeConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ case "lastHeartbeatTime":
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = NodeConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastHeartbeatTime
+ 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.LastTransitionTime = pkg2_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 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 {
+ x.Type = NodeAddressType(r.DecodeString())
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(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 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 {
+ x.Type = NodeAddressType(r.DecodeString())
+ }
+ 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.Address = ""
+ } else {
+ x.Address = string(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 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = NodeSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NodeStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = NodeSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = NodeStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNode(([]Node)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNode((*[]Node)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceNode((*[]Node)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 {
+ x.Phase = NamespacePhase(r.DecodeString())
+ }
+ 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 {
+ x.Phase = NamespacePhase(r.DecodeString())
+ }
+ 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = NamespaceSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NamespaceStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = NamespaceSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = NamespaceStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNamespace(([]Namespace)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNamespace((*[]Namespace)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceNamespace((*[]Namespace)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.Target
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Target
+ yy11.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = ObjectReference{}
+ } else {
+ yyv5 := &x.Target
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Target = ObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 *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 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.GracePeriodSeconds != nil
+ yyq2[1] = x.Preconditions != nil
+ yyq2[2] = x.OrphanDependents != nil
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.GracePeriodSeconds
+ 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("gracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.GracePeriodSeconds
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Preconditions == nil {
+ r.EncodeNil()
+ } else {
+ x.Preconditions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ 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[2] {
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.OrphanDependents
+ 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("orphanDependents"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy14 := *x.OrphanDependents
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeBool(bool(yy14))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ 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)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "gracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ 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)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.Preconditions != nil {
+ x.Preconditions = nil
+ }
+ } else {
+ if x.Preconditions == nil {
+ x.Preconditions = new(Preconditions)
+ }
+ x.Preconditions.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.OrphanDependents != nil {
+ x.OrphanDependents = nil
+ }
+ } else {
+ if x.OrphanDependents == nil {
+ x.OrphanDependents = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.EncodeBool(bool(x.Export))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("export"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Export))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Exact))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exact"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Exact))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "export":
+ if r.TryDecodeAsNil() {
+ x.Export = false
+ } else {
+ x.Export = bool(r.DecodeBool())
+ }
+ case "exact":
+ if r.TryDecodeAsNil() {
+ x.Exact = false
+ } else {
+ x.Exact = bool(r.DecodeBool())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExportOptions) 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.Export = false
+ } else {
+ x.Export = bool(r.DecodeBool())
+ }
+ 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.Exact = false
+ } else {
+ x.Exact = bool(r.DecodeBool())
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.LabelSelector != ""
+ yyq2[1] = x.FieldSelector != ""
+ yyq2[2] = x.Watch != false
+ yyq2[3] = x.ResourceVersion != ""
+ yyq2[4] = x.TimeoutSeconds != nil
+ yyq2[5] = x.Kind != ""
+ yyq2[6] = x.APIVersion != ""
+ 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.LabelSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labelSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("watch"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TimeoutSeconds
+ 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("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TimeoutSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "labelSelector":
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = ""
+ } else {
+ x.LabelSelector = string(r.DecodeString())
+ }
+ case "fieldSelector":
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ x.FieldSelector = string(r.DecodeString())
+ }
+ case "watch":
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ x.Watch = bool(r.DecodeBool())
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.LabelSelector = ""
+ } else {
+ x.LabelSelector = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ x.FieldSelector = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ x.Watch = bool(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.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ 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.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj12++
+ 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 {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.APIVersion = string(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 *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.Container != ""
+ yyq2[1] = x.Follow != false
+ yyq2[2] = x.Previous != false
+ yyq2[3] = x.SinceSeconds != nil
+ yyq2[4] = x.SinceTime != nil
+ yyq2[5] = x.Timestamps != false
+ yyq2[6] = x.TailLines != nil
+ yyq2[7] = x.LimitBytes != nil
+ yyq2[8] = x.Kind != ""
+ yyq2[9] = x.APIVersion != ""
+ 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.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("follow"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("previous"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy13 := *x.SinceSeconds
+ 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("sinceSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.SinceSeconds
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym18 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sinceTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym19 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timestamps"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy24 := *x.TailLines
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(yy24))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tailLines"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy26 := *x.TailLines
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeInt(int64(yy26))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy29 := *x.LimitBytes
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeInt(int64(yy29))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limitBytes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy31 := *x.LimitBytes
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(yy31))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ x.Container = string(r.DecodeString())
+ }
+ case "follow":
+ if r.TryDecodeAsNil() {
+ x.Follow = false
+ } else {
+ x.Follow = bool(r.DecodeBool())
+ }
+ case "previous":
+ if r.TryDecodeAsNil() {
+ x.Previous = false
+ } else {
+ x.Previous = bool(r.DecodeBool())
+ }
+ case "sinceSeconds":
+ if r.TryDecodeAsNil() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ 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_unversioned.Time)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym10 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, false)
+ }
+ }
+ case "timestamps":
+ if r.TryDecodeAsNil() {
+ x.Timestamps = false
+ } else {
+ x.Timestamps = bool(r.DecodeBool())
+ }
+ case "tailLines":
+ if r.TryDecodeAsNil() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ 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)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Container = ""
+ } else {
+ x.Container = string(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.Follow = false
+ } else {
+ x.Follow = bool(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.Previous = false
+ } else {
+ x.Previous = bool(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() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*int64)(x.SinceSeconds)) = 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() {
+ if x.SinceTime != nil {
+ x.SinceTime = nil
+ }
+ } else {
+ if x.SinceTime == nil {
+ x.SinceTime = new(pkg2_unversioned.Time)
+ }
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym25 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym25 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, 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.Timestamps = false
+ } else {
+ x.Timestamps = bool(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() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int64)(x.TailLines)) = 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() {
+ if x.LimitBytes != nil {
+ x.LimitBytes = nil
+ }
+ } else {
+ if x.LimitBytes == nil {
+ x.LimitBytes = new(int64)
+ }
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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.Stdin != false
+ yyq2[1] = x.Stdout != false
+ yyq2[2] = x.Stderr != false
+ yyq2[3] = x.TTY != false
+ yyq2[4] = x.Container != ""
+ yyq2[5] = x.Kind != ""
+ yyq2[6] = x.APIVersion != ""
+ 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.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ x.Stdout = bool(r.DecodeBool())
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ x.Stderr = bool(r.DecodeBool())
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ x.Container = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ 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.Stdout = false
+ } else {
+ x.Stdout = bool(r.DecodeBool())
+ }
+ 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.Stderr = false
+ } else {
+ x.Stderr = bool(r.DecodeBool())
+ }
+ 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.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ 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.Container = ""
+ } else {
+ x.Container = string(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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.Stdin != false
+ yyq2[1] = x.Stdout != false
+ yyq2[2] = x.Stderr != false
+ yyq2[3] = x.TTY != false
+ yyq2[4] = x.Container != ""
+ yyq2[6] = x.Kind != ""
+ yyq2[7] = x.APIVersion != ""
+ 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.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ 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 {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ x.Stdin = bool(r.DecodeBool())
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ x.Stdout = bool(r.DecodeBool())
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ x.Stderr = bool(r.DecodeBool())
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ x.TTY = bool(r.DecodeBool())
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ x.Container = string(r.DecodeString())
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv9 := &x.Command
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv9, false, d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Stdin = false
+ } else {
+ x.Stdin = bool(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.Stdout = false
+ } else {
+ x.Stdout = bool(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.Stderr = false
+ } else {
+ x.Stderr = bool(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.TTY = false
+ } else {
+ x.TTY = bool(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.Container = ""
+ } else {
+ x.Container = string(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.Command = nil
+ } else {
+ yyv19 := &x.Command
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(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() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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.Path != ""
+ yyq2[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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.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.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ 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 *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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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 {
+ x.Path = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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.Path != ""
+ yyq2[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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.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.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ 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 *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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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 {
+ x.Path = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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.Path != ""
+ yyq2[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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.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.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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)
+ 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 *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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ x.Path = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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 {
+ x.Path = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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[4] = x.Controller != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } 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.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ 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.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_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ 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] {
+ if x.Controller == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.Controller
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(yy16))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("controller"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Controller == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.Controller
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *OwnerReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ case "controller":
+ if r.TryDecodeAsNil() {
+ if x.Controller != nil {
+ x.Controller = nil
+ }
+ } else {
+ if x.Controller == nil {
+ x.Controller = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Controller)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *OwnerReference) 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 {
+ x.Kind = string(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 {
+ x.Name = string(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.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(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.Controller != nil {
+ x.Controller = nil
+ }
+ } else {
+ if x.Controller == nil {
+ x.Controller = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Controller)) = 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 *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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 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 {
+ x.Kind = string(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.Namespace = ""
+ } else {
+ x.Namespace = string(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.Name = ""
+ } else {
+ x.Name = string(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.UID = ""
+ } else {
+ x.UID = pkg1_types.UID(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 {
+ x.APIVersion = string(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.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(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.FieldPath = ""
+ } else {
+ x.FieldPath = string(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 *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 {
+ x.Name = string(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 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.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 *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] = true
+ yyq2[1] = x.Kind != ""
+ yyq2[2] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.Reference
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reference"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Reference
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ 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)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "reference":
+ if r.TryDecodeAsNil() {
+ x.Reference = ObjectReference{}
+ } else {
+ yyv4 := &x.Reference
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Reference = ObjectReference{}
+ } else {
+ yyv8 := &x.Reference
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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 {
+ x.Component = string(r.DecodeString())
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ x.Host = string(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 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.Component = ""
+ } else {
+ x.Component = string(r.DecodeString())
+ }
+ 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.Host = ""
+ } else {
+ x.Host = string(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 *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[2] = x.Reason != ""
+ yyq2[3] = x.Message != ""
+ yyq2[4] = true
+ yyq2[5] = true
+ yyq2[6] = true
+ yyq2[7] = x.Count != 0
+ yyq2[8] = x.Type != ""
+ yyq2[9] = x.Kind != ""
+ yyq2[10] = x.APIVersion != ""
+ 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)
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.InvolvedObject
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("involvedObject"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.InvolvedObject
+ yy11.CodecEncodeSelf(e)
+ }
+ 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_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Source
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("source"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Source
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yy25 := &x.FirstTimestamp
+ 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[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy27 := &x.FirstTimestamp
+ 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[6] {
+ yy30 := &x.LastTimestamp
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy30) {
+ } else if yym31 {
+ z.EncBinaryMarshal(yy30)
+ } else if !yym31 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy30)
+ } else {
+ z.EncFallback(yy30)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy32 := &x.LastTimestamp
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy32) {
+ } else if yym33 {
+ z.EncBinaryMarshal(yy32)
+ } else if !yym33 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy32)
+ } else {
+ z.EncFallback(yy32)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("count"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "involvedObject":
+ if r.TryDecodeAsNil() {
+ x.InvolvedObject = ObjectReference{}
+ } else {
+ yyv5 := &x.InvolvedObject
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "source":
+ if r.TryDecodeAsNil() {
+ x.Source = EventSource{}
+ } else {
+ yyv8 := &x.Source
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "firstTimestamp":
+ if r.TryDecodeAsNil() {
+ x.FirstTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv9 := &x.FirstTimestamp
+ 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)
+ }
+ }
+ case "lastTimestamp":
+ if r.TryDecodeAsNil() {
+ x.LastTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv11 := &x.LastTimestamp
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(yyv11)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ case "count":
+ if r.TryDecodeAsNil() {
+ x.Count = 0
+ } else {
+ x.Count = int32(r.DecodeInt(32))
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = string(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yyv18.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.InvolvedObject = ObjectReference{}
+ } else {
+ yyv19 := &x.InvolvedObject
+ yyv19.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.Reason = ""
+ } else {
+ x.Reason = string(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.Message = ""
+ } else {
+ x.Message = string(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.Source = EventSource{}
+ } else {
+ yyv22 := &x.Source
+ 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.FirstTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv23 := &x.FirstTimestamp
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv23) {
+ } else if yym24 {
+ z.DecBinaryUnmarshal(yyv23)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv23)
+ } else {
+ z.DecFallback(yyv23, 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.LastTimestamp = pkg2_unversioned.Time{}
+ } else {
+ yyv25 := &x.LastTimestamp
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv25) {
+ } else if yym26 {
+ z.DecBinaryUnmarshal(yyv25)
+ } else if !yym26 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv25)
+ } else {
+ z.DecFallback(yyv25, 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.Count = 0
+ } else {
+ x.Count = 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.Type = ""
+ } else {
+ x.Type = string(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.Kind = ""
+ } else {
+ x.Kind = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEvent(([]Event)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceEvent((*[]Event)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEvent((*[]Event)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 {
+ x.Type = LimitType(r.DecodeString())
+ }
+ 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 {
+ x.Type = LimitType(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.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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = LimitRangeSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Spec = LimitRangeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceLimitRange(([]LimitRange)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceLimitRange((*[]LimitRange)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceLimitRange((*[]LimitRange)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ResourceQuotaSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ResourceQuotaStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ResourceQuotaSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ResourceQuotaStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceResourceQuota((*[]ResourceQuota)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceResourceQuota((*[]ResourceQuota)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = len(x.Data) != 0
+ yyq2[2] = len(x.StringData) != 0
+ yyq2[3] = x.Type != ""
+ yyq2[4] = x.Kind != ""
+ yyq2[5] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.StringData == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.StringData, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stringData"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StringData == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.StringData, false, e)
+ }
+ }
+ }
+ }
+ 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] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv5 := &x.Data
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv5), d)
+ }
+ }
+ case "stringData":
+ if r.TryDecodeAsNil() {
+ x.StringData = nil
+ } else {
+ yyv7 := &x.StringData
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv7, false, d)
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = SecretType(r.DecodeString())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv13 := &x.ObjectMeta
+ 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.Data = nil
+ } else {
+ yyv14 := &x.Data
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv14), 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.StringData = nil
+ } else {
+ yyv16 := &x.StringData
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv16, 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.Type = ""
+ } else {
+ x.Type = SecretType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.APIVersion = string(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 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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceSecret(([]Secret)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceSecret((*[]Secret)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceSecret((*[]Secret)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = len(x.Data) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv5 := &x.Data
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv5, false, d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Data = nil
+ } else {
+ yyv11 := &x.Data
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv11, false, 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceConfigMap(([]ConfigMap)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceConfigMap((*[]ConfigMap)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceConfigMap((*[]ConfigMap)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 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 {
+ x.Type = ComponentConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = ConditionStatus(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "error":
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ x.Error = string(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 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 {
+ x.Type = ComponentConditionType(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.Status = ""
+ } else {
+ x.Status = ConditionStatus(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 {
+ x.Message = string(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.Error = ""
+ } else {
+ x.Error = string(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 *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] = true
+ yyq2[1] = len(x.Conditions) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv5 := &x.Conditions
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(yyv5), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Conditions = nil
+ } else {
+ yyv11 := &x.Conditions
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceComponentStatus((*[]ComponentStatus)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceComponentStatus((*[]ComponentStatus)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [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 *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)
+ }
+ }
+ 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 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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.FieldRef != nil
+ yyq2[2] = x.ResourceFieldRef != 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.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_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 {
+ x.Path = string(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)
+ }
+ 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 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 {
+ x.Path = string(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() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.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.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.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 *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 {
+ x.User = string(r.DecodeString())
+ }
+ case "role":
+ if r.TryDecodeAsNil() {
+ x.Role = ""
+ } else {
+ x.Role = string(r.DecodeString())
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ x.Type = string(r.DecodeString())
+ }
+ case "level":
+ if r.TryDecodeAsNil() {
+ x.Level = ""
+ } else {
+ x.Level = string(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 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.User = ""
+ } else {
+ x.User = string(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.Role = ""
+ } else {
+ x.Role = string(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.Type = ""
+ } else {
+ x.Type = string(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.Level = ""
+ } else {
+ x.Level = string(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 *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] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Range))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ 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 {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "range":
+ if r.TryDecodeAsNil() {
+ x.Range = ""
+ } else {
+ x.Range = string(r.DecodeString())
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv6 := &x.Data
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Range = ""
+ } else {
+ x.Range = string(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.Data = nil
+ } else {
+ yyv13 := &x.Data
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *yyv13 = r.DecodeBytes(*(*[]byte)(yyv13), false, 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) encSliceOwnerReference(v []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
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceOwnerReference(v *[]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 = []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, 72)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]OwnerReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]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] = OwnerReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, OwnerReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = OwnerReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, OwnerReference{}) // var yyz1 OwnerReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = OwnerReference{}
+ } 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 = []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 {
+ yyv1[yyj1] = PersistentVolumeAccessMode(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = PersistentVolumeAccessMode(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = PersistentVolumeAccessMode(r.DecodeString())
+ }
+
+ } 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, 456)
+ 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, 352)
+ 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, 32)
+ 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) 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 {
+ yyv1[yyj1] = Capability(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = Capability(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = Capability(r.DecodeString())
+ }
+
+ } 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) 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, 176)
+ 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, 256)
+ 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) 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, 648)
+ 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, 696)
+ 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) 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, 280)
+ 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, 432)
+ 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, 288)
+ 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, 40)
+ 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, 264)
+ 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) 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 {
+ yyv1[yyj1] = UniqueVolumeName(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = UniqueVolumeName(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = UniqueVolumeName(r.DecodeString())
+ }
+
+ } 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) 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 {
+ yymk1 = ResourceName(r.DecodeString())
+ }
+
+ 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 {
+ yymk1 = ResourceName(r.DecodeString())
+ }
+
+ 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, 616)
+ 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 {
+ yyv1[yyj1] = FinalizerName(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = FinalizerName(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = FinalizerName(r.DecodeString())
+ }
+
+ } 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, 280)
+ 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, 488)
+ 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, 264)
+ 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 {
+ yyv1[yyj1] = ResourceQuotaScope(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = ResourceQuotaScope(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = ResourceQuotaScope(r.DecodeString())
+ }
+
+ } 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, 288)
+ 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else {
+ *yyv3 = r.DecodeBytes(*(*[]byte)(yyv3), 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), 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.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeUint(uint64(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceuint8(v *[]uint8, 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 = []uint8{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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, 1)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]uint8, yyrl1)
+ }
+ } else {
+ yyv1 = make([]uint8, 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] = 0
+ } else {
+ yyv1[yyj1] = uint8(r.DecodeUint(8))
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, 0)
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = 0
+ } else {
+ yyv1[yyj1] = uint8(r.DecodeUint(8))
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, 0) // var yyz1 uint8
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = 0
+ } else {
+ yyv1[yyj1] = uint8(r.DecodeUint(8))
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []uint8{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+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, 272)
+ 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, 248)
+ 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, 264)
+ 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, 32)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.go
new file mode 100644
index 0000000..42a0b98
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types.go
@@ -0,0 +1,3329 @@
+/*
+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/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// The comments for the structs and fields can be used from go-resful 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.
+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://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency
+ 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://releases.k8s.io/HEAD/docs/user-guide/namespaces.md
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ 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://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ CreationTimestamp unversioned.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 will 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. Once the resource is deleted in the API, the Kubelet
+ // will send a hard termination signal to the container.
+ // 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ DeletionTimestamp *unversioned.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.
+ 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://releases.k8s.io/HEAD/docs/user-guide/labels.md
+ // TODO: replace map[string]string with labels.LabelSet type
+ 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://releases.k8s.io/HEAD/docs/user-guide/annotations.md
+ 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.
+ OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`
+
+ // 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.
+ Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"`
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"`
+ // GitRepo represents a git repository at a particular revision.
+ GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"`
+ // Secret represents a secret that should populate this volume.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ 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: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ 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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"`
+ // PersistentVolumeClaimVolumeSource represents a reference to a
+ // PersistentVolumeClaim in the same namespace.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ 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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using a exec based plugin. This is an
+ // alpha feature and may change in future.
+ 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: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ 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
+ 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
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
+
+ // DownwardAPI represents downward API about the pod that should populate this volume
+ 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.
+ 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.
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"`
+ // ConfigMap represents a configMap that should populate this volume
+ ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"`
+ // Will force the ReadOnly setting in VolumeMounts.
+ // Default false.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath
+ 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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ 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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ 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.
+ 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: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ 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
+ 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.
+ 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
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using a exec based plugin. This is an
+ // alpha feature and may change in future.
+ 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.
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// PersistentVolume (PV) is a storage resource provisioned by an administrator.
+// It is analogous to a node.
+// More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md
+type PersistentVolume struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#binding
+ 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.
+ // Recyling must be supported by the volume plugin underlying this persistent volume.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy
+ PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#phase
+ 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.
+ 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.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+}
+
+// PersistentVolumeList is a list of PersistentVolume items.
+type PersistentVolumeList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of persistent volumes.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md
+ Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+type PersistentVolumeClaim struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims
+ Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
+type PersistentVolumeClaimList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // A list of persistent volume claims.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // A label query over volumes to consider for binding.
+ Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
+ // Resources represents the minimum resources the volume should have.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#resources
+ Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"`
+ // VolumeName is the binding reference to the PersistentVolume backing this claim.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"`
+}
+
+// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
+type PersistentVolumeClaimStatus struct {
+ // Phase represents the current phase of PersistentVolumeClaim.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // Represents the actual resources of the underlying volume.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir
+ Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"`
+}
+
+// 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: http://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: http://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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ 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: http://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: http://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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#rbd
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // The rados pool name.
+ // Default is rbd.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it.
+ RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"`
+ // The rados user name.
+ // Default is admin.
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ 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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ 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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ 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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ 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: http://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: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ 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: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ 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: http://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 /
+ Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
+ // Optional: User is the rados user name, default is admin
+ // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ 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: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ 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: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ 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: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+type FlockerVolumeSource struct {
+ // Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
+ DatasetName string `json:"datasetName" protobuf:"bytes,1,opt,name=datasetName"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using a 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.
+ 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.
+ 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.
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // Optional: Extra command options if any.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ 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).
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore
+ 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.
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets
+ 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. Paths must be relative and may not contain
+ // the '..' path or start with '..'.
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ Server string `json:"server" protobuf:"bytes,1,opt,name=server"`
+
+ // Path that is exported by the NFS server.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
+}
+
+// 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 world wide 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
+ 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.
+ 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.
+ 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.
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+}
+
+// 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. Paths must be relative and may not contain
+ // the '..' path or start with '..'.
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+}
+
+// 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"`
+}
+
+// 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.
+ 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.
+ 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".
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"`
+ // What host IP to bind the external port to.
+ 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.
+ 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).
+ 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 "".
+ 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.
+ 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; only name and namespace are supported.
+ 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.
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"`
+ // Selects a key of a ConfigMap.
+ ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
+ // Selects a key of a secret in the pod's namespace
+ 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".
+ 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
+ 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"
+ 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"`
+}
+
+// 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"`
+}
+
+// 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.
+ 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.
+ Host string `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"`
+ // Scheme to use for connecting to the host.
+ // Defaults to HTTP.
+ Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"`
+ // Custom headers to set in the request. HTTP allows repeated headers.
+ 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"`
+}
+
+// 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ 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.
+ 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.
+ 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.
+ 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"
+)
+
+// Capability represent POSIX capabilities type
+type Capability string
+
+// Adds and removes POSIX capabilities from running containers.
+type Capabilities struct {
+ // Added capabilities
+ Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"`
+ // Removed capabilities
+ 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: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
+ 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: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md
+ Image string `json:"image,omitempty" 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: http://releases.k8s.io/HEAD/docs/user-guide/containers.md#containers-and-commands
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/containers.md#containers-and-commands
+ 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.
+ 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.
+ Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#resources
+ Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,9,rep,name=volumeMounts"`
+ // Periodic probe of container liveness.
+ // Container will be restarted if the probe fails.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes
+ 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.
+ 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.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"`
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#updating-images
+ ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
+ // Security options the pod should run with.
+ // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md
+ 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.
+ 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
+ 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.
+ 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.
+ Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
+ // HTTPGet specifies the http request to perform.
+ 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
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details
+ 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.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"`
+ // Message regarding why the container is not yet running.
+ 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
+ StartedAt unversioned.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
+ Signal int32 `json:"signal,omitempty" protobuf:"varint,2,opt,name=signal"`
+ // (brief) reason from the last termination of the container
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+ // Message regarding the last termination of the container
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+ // Time at which previous execution of the container started
+ StartedAt unversioned.Time `json:"startedAt,omitempty" protobuf:"bytes,5,opt,name=startedAt"`
+ // Time at which the container last terminated
+ FinishedAt unversioned.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"`
+ // Container's ID in the format 'docker://<container_id>'
+ 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
+ Waiting *ContainerStateWaiting `json:"waiting,omitempty" protobuf:"bytes,1,opt,name=waiting"`
+ // Details about a running container
+ Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"`
+ // Details about a terminated container
+ 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.
+ State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"`
+ // Details about the container's last termination condition.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md
+ // 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>'.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information
+ 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"
+)
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Last time we probed the condition.
+ LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // Unique, one-word, CamelCase reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human-readable message indicating details about last transition.
+ 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 (
+ // DNSClusterFirst 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.
+ 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.
+ 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.
+ 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.
+ 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)).
+ 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)).
+ 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.
+ // 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.
+ 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.
+ 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.
+ // 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.
+ 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.
+ 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.
+ LabelSelector *unversioned.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // nil list means "this pod's namespace," empty list means "all namespaces"
+ // The json tag here is not "omitempty" since we need to distinguish nil and empty.
+ // See https://golang.org/pkg/encoding/json/#Marshal for more details.
+ Namespaces []string `json:"namespaces" 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.
+ 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.
+ // 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.
+ 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.
+ 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.
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Required. The taint value corresponding to the taint key.
+ 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 and PreferNoSchedule.
+ Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"`
+}
+
+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.
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // do not allow pods to start on Kubelet unless they tolerate the taint,
+ // but allow all already-running pods to continue running.
+ // Enforced by the scheduler and Kubelet.
+ // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit"
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // do not allow pods to start on Kubelet unless they tolerate the taint,
+ // and evict any already-running pods that do not tolerate the taint.
+ // Enforced by the scheduler and Kubelet.
+ // TaintEffectNoScheduleNoAdmitNoExecute = "NoScheduleNoAdmitNoExecute"
+)
+
+// 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 {
+ // Required. Key is the taint key that the toleration applies to.
+ 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.
+ 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.
+ 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 and PreferNoSchedule.
+ Effect TaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=TaintEffect"`
+ // TODO: For forgiveness (#1574), we'd eventually add at least a grace period
+ // here, and possibly an occurrence threshold and period.
+}
+
+// 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.
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md
+ 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.
+ // Init containers are in alpha state and may change without notice.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/containers.md
+ InitContainers []Container `json:"-" patchStrategy:"merge" patchMergeKey:"name"`
+ // 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.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/containers.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#restartpolicy
+ 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.
+ 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.
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"`
+ // Set DNS policy for containers within the pod.
+ // One of 'ClusterFirst' or 'Default'.
+ // Defaults to "ClusterFirst".
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md
+ 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: http://releases.k8s.io/HEAD/docs/design/service_accounts.md
+ 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
+ DeprecatedServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,9,opt,name=serviceAccount"`
+
+ // 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.
+ 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
+ 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
+ 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
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod
+ 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.
+ 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.
+ Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"`
+}
+
+// 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ FSGroup *int64 `json:"fsGroup,omitempty" protobuf:"varint,5,opt,name=fsGroup"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase
+ Phase PodPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"`
+ // Current service state of pod.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions
+ 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.
+ 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'
+ 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.
+ 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.
+ 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.
+ StartTime *unversioned.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.
+ // Init containers are in alpha state and may change without notice.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses
+ InitContainerStatuses []ContainerStatus `json:"-"`
+ // The list has one entry per container in the manifest. Each entry is currently the output
+ // of `docker inspect`.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses
+ ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"`
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+type PodStatusResult struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the pod.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodList is a list of Pods.
+type PodList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of pods.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/pods.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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the pod.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Template defines the pods that will be created from this pod template.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Template PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
+}
+
+// PodTemplateList is a list of PodTemplates.
+type PodTemplateList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ 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.
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ 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.
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
+
+ // ObservedGeneration reflects the generation of the most recently observed replication controller.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
+}
+
+// +genclient=true
+
+// ReplicationController represents the configuration of a replication controller.
+type ReplicationController struct {
+ unversioned.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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the specification of the desired behavior of the replication controller.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status ReplicationControllerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+type ReplicationControllerList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of replication controllers.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md
+ 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"
+)
+
+// ServiceStatus represents the current status of a service.
+type ServiceStatus struct {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ 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.
+ 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)
+ 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)
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
+ Ports []ServicePort `json:"ports" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`
+
+ // This service will route traffic to pods having labels matching this selector.
+ // Label keys and values that must match in order to receive traffic for this service.
+ // If not specified, endpoints must be manually specified and the system will not automatically manage them.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // ClusterIP is usually assigned by the master and is the IP address of the service.
+ // If specified, it will be allocated to the service if it is unused
+ // or else creation of the service will fail.
+ // Valid values are None, empty string (""), or a valid IP address.
+ // 'None' can be specified for a headless service when proxying is not required.
+ // Cannot be updated.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
+ ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"`
+
+ // Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer.
+ // Defaults to ClusterIP.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services
+ 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. A previous form of this
+ // functionality exists as the deprecatedPublicIPs field. When using this
+ // field, callers should also clear the deprecatedPublicIPs field.
+ ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"`
+
+ // deprecatedPublicIPs is deprecated and replaced by the externalIPs field
+ // with almost the exact same semantics. This field is retained in the v1
+ // API for compatibility until at least 8/20/2016. It will be removed from
+ // any new API revisions. If both deprecatedPublicIPs *and* externalIPs are
+ // set, deprecatedPublicIPs is used.
+ // +k8s:conversion-gen=false
+ DeprecatedPublicIPs []string `json:"deprecatedPublicIPs,omitempty" protobuf:"bytes,6,rep,name=deprecatedPublicIPs"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
+ LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"`
+}
+
+// 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.
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ // Default is TCP.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#defining-a-service
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of a service.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md#manually-specifying-an-imagepullsecret
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"`
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+type ServiceAccountList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ServiceAccounts.
+ // More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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.
+ 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.
+ NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"`
+ // Port numbers available on the related IP addresses.
+ 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
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
+ // Reference to object providing the endpoint.
+ 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.
+ 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.
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"`
+}
+
+// EndpointsList is a list of endpoints.
+type EndpointsList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.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.
+ 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.
+ 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>
+ 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: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"`
+ Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"`
+}
+
+// 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.
+ 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 {
+ // Machine ID reported by the node.
+ MachineID string `json:"machineID" protobuf:"bytes,1,opt,name=machineID"`
+ // System UUID reported by the node.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity for more details.
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase
+ Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"`
+ // Conditions is an array of current observed node conditions.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition
+ 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: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses
+ Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"`
+ // Endpoints of daemons running on the Node.
+ DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty" protobuf:"bytes,6,opt,name=daemonEndpoints"`
+ // Set of ids/uuids to uniquely identify the node.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info
+ NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"`
+ // List of container images on this node
+ Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"`
+ // List of attachable volumes in use (mounted) by the node.
+ VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"`
+ // List of volumes that are attached to the node.
+ 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 avilable
+ DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"`
+}
+
+// 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.
+ 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"
+ // NodeNetworkUnavailable means that network for the node is not correctly configured.
+ NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
+)
+
+// NodeCondition contains condition infromation 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.
+ LastHeartbeatTime unversioned.Time `json:"lastHeartbeatTime,omitempty" protobuf:"bytes,3,opt,name=lastHeartbeatTime"`
+ // Last time the condition transit from one status to another.
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ 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"
+)
+
+// 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"
+ // 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
+)
+
+// 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, formerly known as minion.
+// Each node will have a unique identifier in the cache (i.e. in etcd).
+type Node struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of a node.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of nodes
+ Items []Node `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+type FinalizerName string
+
+// These are internal finalizer values to Kubernetes, must be qualified name unless defined here
+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: http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers
+ 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: http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of the Namespace.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec NamespaceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status describes the current status of a Namespace.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status NamespaceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// NamespaceList is a list of Namespaces.
+type NamespaceList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Namespace objects in the list.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md
+ 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.
+type Binding struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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.
+type Preconditions struct {
+ // Specifies the target UID.
+ UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"`
+}
+
+// DeleteOptions may be provided when deleting an API object
+type DeleteOptions struct {
+ unversioned.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.
+ 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.
+ Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"`
+
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"`
+}
+
+// ExportOptions is the query options to the standard REST get call.
+type ExportOptions struct {
+ unversioned.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"`
+}
+
+// ListOptions is the query options to a standard REST list call.
+type ListOptions struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ 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.
+ FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"`
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ 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.
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
+ // Timeout for the list/watch call.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"`
+ // Follow the log stream of the pod. Defaults to false.
+ Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"`
+ // Return previous terminated container logs. Defaults to false.
+ 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.
+ 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.
+ SinceTime *unversioned.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.
+ 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
+ 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.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Stdin if true, redirects the standard input stream of the pod for this call.
+ // Defaults to false.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Redirect the standard input stream of the pod for this call.
+ // Defaults to false.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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"`
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call.
+type PodProxyOptions struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Path is the URL path to use for the current proxy request to pod.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Path is the URL path to use for the current proxy request to node.
+ 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 {
+ unversioned.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.
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+ // UID of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"`
+ // If true, this reference points to the managing controller.
+ Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"`
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+type ObjectReference struct {
+ // Kind of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
+ // Namespace of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
+ // Name of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"`
+ // UID of the referent.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"`
+ // API version of the referent.
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"`
+ // Specific resourceVersion to which this reference is made, if any.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ // TODO: Add other useful fields. apiVersion, kind, uid?
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+}
+
+// SerializedReference is a reference to serialized object.
+type SerializedReference struct {
+ unversioned.TypeMeta `json:",inline"`
+ // The reference to an object in the system.
+ 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.
+ Component string `json:"component,omitempty" protobuf:"bytes,1,opt,name=component"`
+ // Host name on which the event is generated.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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.
+ 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.
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+
+ // The component reporting this event. Should be a short machine understandable string.
+ 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.)
+ FirstTimestamp unversioned.Time `json:"firstTimestamp,omitempty" protobuf:"bytes,6,opt,name=firstTimestamp"`
+
+ // The time at which the most recent occurrence of this event was recorded.
+ LastTimestamp unversioned.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"`
+
+ // The number of times this event has occurred.
+ 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
+ Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"`
+}
+
+// EventList is a list of events.
+type EventList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.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"
+)
+
+// 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.
+ Type LimitType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=LimitType"`
+ // Max usage constraints on this kind by resource name.
+ Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"`
+ // Min usage constraints on this kind by resource name.
+ 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.
+ 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.
+ 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.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the limits enforced.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec LimitRangeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// LimitRangeList is a list of LimitRange items.
+type LimitRangeList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of LimitRange objects.
+ // More info: http://releases.k8s.io/HEAD/docs/design/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"
+ // 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: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota
+ 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.
+ 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: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota
+ 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.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired quota.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec ResourceQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status defines the actual enforced quota and its current usage.
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceQuotaList is a list of ResourceQuota items.
+type ResourceQuotaList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ResourceQuota objects.
+ // More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN
+ // or leading dot followed by valid DNS_SUBDOMAIN.
+ // 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
+ 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
+ StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"`
+
+ // Used to facilitate programmatic handling of secret data.
+ 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"
+
+ // 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of secret objects.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md
+ Items []Secret `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ConfigMap holds configuration data for pods to consume.
+type ConfigMap struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data contains the configuration data.
+ // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.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.
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // Condition error code for a component.
+ // For example, a health check error code.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of component conditions observed
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.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
+ Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
+}
+
+// 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.
+ 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.
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
+}
+
+// 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,5,opt,name=runAsNonRoot"`
+ // Whether this container has a read-only root filesystem.
+ // Default is false.
+ 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.
+ User string `json:"user,omitempty" protobuf:"bytes,1,opt,name=user"`
+ // Role is a SELinux role label that applies to the container.
+ Role string `json:"role,omitempty" protobuf:"bytes,2,opt,name=role"`
+ // Type is a SELinux type label that applies to the container.
+ Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"`
+ // Level is SELinux level label that applies to the container.
+ Level string `json:"level,omitempty" protobuf:"bytes,4,opt,name=level"`
+}
+
+// RangeAllocation is not a public type.
+type RangeAllocation struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ 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"
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..c5eb00d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go
@@ -0,0 +1,1742 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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 avilable",
+}
+
+func (AttachedVolume) SwaggerDoc() map[string]string {
+ return map_AttachedVolume
+}
+
+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.",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "data": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.",
+}
+
+func (ConfigMap) SwaggerDoc() map[string]string {
+ return map_ConfigMap
+}
+
+var map_ConfigMapKeySelector = map[string]string{
+ "": "Selects a key from a ConfigMap.",
+ "key": "The key to select.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ConfigMaps.",
+}
+
+func (ConfigMapList) SwaggerDoc() map[string]string {
+ return map_ConfigMapList
+}
+
+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. Paths must be relative and may not contain the '..' path or start with '..'.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/images.md",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/containers.md#containers-and-commands",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/containers.md#containers-and-commands",
+ "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.",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#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. Defaults to /dev/termination-log. 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: http://releases.k8s.io/HEAD/docs/user-guide/images.md#updating-images",
+ "securityContext": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/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: http://releases.k8s.io/HEAD/docs/user-guide/images.md",
+ "imageID": "ImageID of the container's image.",
+ "containerID": "Container's ID in the format 'docker://<container_id>'. More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information",
+}
+
+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",
+ "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": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.",
+}
+
+func (DeleteOptions) SwaggerDoc() map[string]string {
+ return map_DeleteOptions
+}
+
+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.",
+}
+
+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",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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",
+ "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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "List of endpoints.",
+}
+
+func (EndpointsList) SwaggerDoc() map[string]string {
+ return map_EndpointsList
+}
+
+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; only 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.",
+ "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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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": "Host 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_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_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 world wide 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 a 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. Flocker volumes do not support ownership management or SELinux relabeling.",
+ "datasetName": "Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+ "path": "Path is the Glusterfs volume path. More info: http://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: http://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_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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
+}
+
+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 '..'.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the limits enforced. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of LimitRange objects. More info: http://releases.k8s.io/HEAD/docs/design/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: http://releases.k8s.io/HEAD/docs/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.",
+ "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.",
+ "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.",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
+}
+
+func (LocalObjectReference) SwaggerDoc() map[string]string {
+ return map_LocalObjectReference
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs",
+ "path": "Path that is exported by the NFS server. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs",
+ "readOnly": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of the Namespace. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status describes the current status of a Namespace. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "Items is the list of Namespace objects in the list. More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
+}
+
+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: http://releases.k8s.io/HEAD/docs/design/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: http://releases.k8s.io/HEAD/docs/design/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, formerly known as minion. Each node will have a unique identifier in the cache (i.e. in etcd).",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of a node. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the node. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/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 infromation 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: http://releases.k8s.io/HEAD/docs/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_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: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"`",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity for more details.",
+ "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: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase",
+ "conditions": "Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition",
+ "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses",
+ "daemonEndpoints": "Endpoints of daemons running on the Node.",
+ "nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#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": "Machine ID reported by the node.",
+ "systemUUID": "System UUID reported by the node.",
+ "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.",
+ "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://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#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: http://releases.k8s.io/HEAD/docs/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://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
+ "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://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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 will 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. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. 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: http://releases.k8s.io/HEAD/docs/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://releases.k8s.io/HEAD/docs/user-guide/labels.md",
+ "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://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
+ "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.",
+ "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.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "namespace": "Namespace of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
+ "name": "Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
+ "uid": "UID of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids",
+ "apiVersion": "API version of the referent.",
+ "resourceVersion": "Specific resourceVersion to which this reference is made, if any. More info: http://releases.k8s.io/HEAD/docs/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_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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "name": "Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
+ "uid": "UID of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids",
+ "controller": "If true, this reference points to the managing controller.",
+}
+
+func (OwnerReference) SwaggerDoc() map[string]string {
+ return map_OwnerReference
+}
+
+var map_PersistentVolume = map[string]string{
+ "": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes",
+ "status": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired characteristics of a volume requested by a pod author. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims",
+ "status": "Status represents the current information/status of a persistent volume claim. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "A list of persistent volume claims. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#resources",
+ "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "List of persistent volumes. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath",
+ "glusterfs": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
+ "nfs": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs",
+ "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://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: http://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 a 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",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity",
+ "accessModes": "AccessModes contains all ways the volume can be mounted. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#binding",
+ "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recyling must be supported by the volume plugin underlying this persistent volume. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#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_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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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); nil list means \"this pod's namespace,\" empty list means \"all namespaces\" The json tag here is not \"omitempty\" since we need to distinguish nil and empty. See https://golang.org/pkg/encoding/json/#Marshal for more details.",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions",
+ "status": "Status is the status of the condition. Can be True, False, Unknown. More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "List of pods. More info: http://releases.k8s.io/HEAD/docs/user-guide/pods.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_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_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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md",
+ "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. More info: http://releases.k8s.io/HEAD/docs/user-guide/containers.md",
+ "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#restartpolicy",
+ "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 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\".",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md",
+ "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md",
+ "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/images.md#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.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase",
+ "conditions": "Current service state of pod. More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#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.",
+ "containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses",
+}
+
+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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "template": "Template defines the pods that will be created from this pod template. http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodTemplateSpec) SwaggerDoc() map[string]string {
+ return map_PodTemplateSpec
+}
+
+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_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: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
+ "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#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_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: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "image": "The rados image name. More info: http://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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#rbd",
+ "pool": "The rados pool name. Default is rbd. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it.",
+ "user": "The rados user name. Default is admin. More info: http://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: http://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: http://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: http://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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the specification of the desired behavior of the replication controller. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+}
+
+func (ReplicationController) SwaggerDoc() map[string]string {
+ return map_ReplicationController
+}
+
+var map_ReplicationControllerList = map[string]string{
+ "": "ReplicationControllerList is a collection of replication controllers.",
+ "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "List of replication controllers. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
+ "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.",
+ "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired quota. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status defines the actual enforced quota and its current usage. http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of ResourceQuota objects. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
+}
+
+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: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
+ "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: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
+ "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: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
+ "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: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
+}
+
+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_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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "data": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. 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_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.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of secret objects. More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
+}
+
+func (SecretList) SwaggerDoc() map[string]string {
+ return map_SecretList
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets",
+ "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. Paths must be relative and may not contain the '..' path or start with '..'.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of a service. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the service. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "secrets": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md#manually-specifying-an-imagepullsecret",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "List of ServiceAccounts. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts",
+}
+
+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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
+ "selector": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
+ "clusterIP": "ClusterIP is usually assigned by the master and is the IP address of the service. If specified, it will be allocated to the service if it is unused or else creation of the service will fail. Valid values are None, empty string (\"\"), or a valid IP address. 'None' can be specified for a headless service when proxying is not required. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
+ "type": "Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer. Defaults to ClusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-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. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.",
+ "deprecatedPublicIPs": "deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/services.md#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: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md",
+}
+
+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_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.",
+}
+
+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 and PreferNoSchedule.",
+}
+
+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": "Required. Key is the taint key that the toleration applies to.",
+ "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 and PreferNoSchedule.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#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_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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath",
+ "emptyDir": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore",
+ "gitRepo": "GitRepo represents a git repository at a particular revision.",
+ "secret": "Secret represents a secret that should populate this volume. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets",
+ "nfs": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#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: http://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: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
+ "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims",
+ "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
+ "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using a 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: http://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",
+}
+
+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.",
+}
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go
new file mode 100644
index 0000000..f17a15c
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/events.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/events.go
new file mode 100644
index 0000000..754cf88
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/events.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 validation
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/util/validation"
+ "k8s.io/kubernetes/pkg/util/validation/field"
+)
+
+// ValidateEvent makes sure that the event makes sense.
+func ValidateEvent(event *api.Event) field.ErrorList {
+ allErrs := field.ErrorList{}
+ // There is no namespace required for node or persistent volume.
+ // However, older client code accidentally sets event.Namespace
+ // to api.NamespaceDefault, so we accept that too, but "" is preferred.
+ if (event.InvolvedObject.Kind == "Node" || event.InvolvedObject.Kind == "PersistentVolume") &&
+ event.Namespace != api.NamespaceDefault &&
+ event.Namespace != "" {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "not allowed for node"))
+ }
+ if event.InvolvedObject.Kind != "Node" &&
+ event.InvolvedObject.Kind != "PersistentVolume" &&
+ event.Namespace != event.InvolvedObject.Namespace {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match involvedObject"))
+ }
+ for _, msg := range validation.IsDNS1123Subdomain(event.Namespace) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("namespace"), event.Namespace, msg))
+ }
+ return allErrs
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/name.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/name.go
new file mode 100644
index 0000000..1358e6e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/name.go
@@ -0,0 +1,66 @@
+/*
+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"
+ "strings"
+)
+
+// 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)}
+ }
+ }
+
+ for _, illegalContent := range NameMayNotContain {
+ if strings.Contains(name, illegalContent) {
+ return []string{fmt.Sprintf(`may not contain '%s'`, illegalContent)}
+ }
+ }
+
+ return nil
+}
+
+// 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 {
+ for _, illegalContent := range NameMayNotContain {
+ if strings.Contains(name, illegalContent) {
+ return []string{fmt.Sprintf(`may not contain '%s'`, illegalContent)}
+ }
+ }
+
+ return nil
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go
new file mode 100644
index 0000000..f6a4d07
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go
@@ -0,0 +1,370 @@
+/*
+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"
+ "reflect"
+ "regexp"
+ "strings"
+
+ "github.com/emicklei/go-restful/swagger"
+ "github.com/golang/glog"
+ apiutil "k8s.io/kubernetes/pkg/api/util"
+ "k8s.io/kubernetes/pkg/runtime"
+ utilerrors "k8s.io/kubernetes/pkg/util/errors"
+ "k8s.io/kubernetes/pkg/util/yaml"
+)
+
+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 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: expected object of type map[string]interface{}, but the actual type is %T", fieldName, obj))
+ }
+ if delegated, err := s.delegateIfDifferentApiVersion(runtime.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: expected object of type map[string]interface{}, but the actual type is %T", fieldName, 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: is required", requiredKey))
+ }
+ }
+ 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 from object: %v", 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", 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 runtime.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 runtime.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)\..*`)
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go
new file mode 100644
index 0000000..3854004
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go
@@ -0,0 +1,3193 @@
+/*
+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"
+ "os"
+ "path"
+ "reflect"
+ "strings"
+
+ "github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/endpoints"
+ utilpod "k8s.io/kubernetes/pkg/api/pod"
+ "k8s.io/kubernetes/pkg/api/resource"
+ apiservice "k8s.io/kubernetes/pkg/api/service"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ unversionedvalidation "k8s.io/kubernetes/pkg/api/unversioned/validation"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/capabilities"
+ "k8s.io/kubernetes/pkg/labels"
+ "k8s.io/kubernetes/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/util/validation"
+ "k8s.io/kubernetes/pkg/util/validation/field"
+)
+
+// TODO: delete this global variable when we enable the validation of common
+// fields by default.
+var RepairMalformedUpdates bool = true
+
+const isNegativeErrorMsg string = `must be greater than or equal to 0`
+const isInvalidQuotaResource string = `must be a standard resource for quota`
+const fieldImmutableErrorMsg string = `field is immutable`
+const isNotIntegerErrorMsg string = `must be an integer`
+
+var pdPartitionErrorMsg string = validation.InclusiveRangeError(1, 255)
+
+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[unversioned.GroupVersionKind]struct{}{
+ v1.SchemeGroupVersion.WithKind("Event"): {},
+}
+
+// ValidateHasLabel requires that api.ObjectMeta has a Label with key and expectedValue
+func ValidateHasLabel(meta api.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 {
+ 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 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
+}
+
+func ValidatePodSpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if annotations[api.AffinityAnnotationKey] != "" {
+ allErrs = append(allErrs, ValidateAffinityInPodAnnotations(annotations, fldPath)...)
+ }
+
+ if annotations[api.TolerationsAnnotationKey] != "" {
+ allErrs = append(allErrs, ValidateTolerationsInPodAnnotations(annotations, fldPath)...)
+ }
+
+ // TODO: remove these after we EOL the annotations.
+ if hostname, exists := annotations[utilpod.PodHostnameAnnotation]; exists {
+ allErrs = append(allErrs, ValidateDNS1123Label(hostname, fldPath.Key(utilpod.PodHostnameAnnotation))...)
+ }
+ if subdomain, exists := annotations[utilpod.PodSubdomainAnnotation]; exists {
+ allErrs = append(allErrs, ValidateDNS1123Label(subdomain, fldPath.Key(utilpod.PodSubdomainAnnotation))...)
+ }
+
+ allErrs = append(allErrs, ValidateSeccompPodAnnotations(annotations, fldPath)...)
+
+ return allErrs
+}
+
+func ValidateEndpointsSpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ // TODO: remove this after we EOL the annotation.
+ hostnamesMap, exists := annotations[endpoints.PodHostnamesAnnotation]
+ if exists && !isValidHostnamesMap(hostnamesMap) {
+ allErrs = append(allErrs, field.Invalid(fldPath, endpoints.PodHostnamesAnnotation,
+ `must be a valid json representation of map[string(IP)][HostRecord] e.g. "{"10.245.1.6":{"HostName":"my-webserver"}}"`))
+ }
+
+ return allErrs
+}
+
+func validateOwnerReference(ownerReference api.OwnerReference, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ gvk := unversioned.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 []api.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
+}
+
+// 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
+
+// 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 = NameIsDNS952Label
+
+// 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 = NameIsDNSLabel
+
+// 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 = NameIsDNSSubdomain
+
+// 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
+
+// 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)
+}
+
+// NameIsDNS952Label is a ValidateNameFunc for names that must be a DNS 952 label.
+func NameIsDNS952Label(name string, prefix bool) []string {
+ if prefix {
+ name = maskTrailingDash(name)
+ }
+ return validation.IsDNS952Label(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
+}
+
+// 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 {
+ allErrs := field.ErrorList{}
+ if !api.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.
+// TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate.
+func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(meta.GenerateName) != 0 {
+ for _, msg := range nameFn(meta.GenerateName, true) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("generateName"), meta.GenerateName, 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 a or as a separator
+ if len(meta.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), "name or generateName is required"))
+ } else {
+ for _, msg := range nameFn(meta.Name, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), meta.Name, msg))
+ }
+ }
+ if requiresNamespace {
+ if len(meta.Namespace) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("namespace"), ""))
+ } else {
+ for _, msg := range ValidateNamespaceName(meta.Namespace, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), meta.Namespace, msg))
+ }
+ }
+ } else {
+ if len(meta.Namespace) != 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
+ }
+ }
+ allErrs = append(allErrs, ValidateNonnegativeField(meta.Generation, fldPath.Child("generation"))...)
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabels(meta.Labels, fldPath.Child("labels"))...)
+ allErrs = append(allErrs, ValidateAnnotations(meta.Annotations, fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidateOwnerReferences(meta.OwnerReferences, fldPath.Child("ownerReferences"))...)
+ for _, finalizer := range meta.Finalizers {
+ allErrs = append(allErrs, validateFinalizerName(finalizer, fldPath.Child("finalizers"))...)
+ }
+ return allErrs
+}
+
+// ValidateObjectMetaUpdate validates an object's metadata when updated
+func ValidateObjectMetaUpdate(newMeta, oldMeta *api.ObjectMeta, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if !RepairMalformedUpdates && newMeta.UID != oldMeta.UID {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), newMeta.UID, "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.UID) == 0 {
+ newMeta.UID = oldMeta.UID
+ }
+ // ignore changes to timestamp
+ if oldMeta.CreationTimestamp.IsZero() {
+ oldMeta.CreationTimestamp = newMeta.CreationTimestamp
+ } else {
+ newMeta.CreationTimestamp = oldMeta.CreationTimestamp
+ }
+ // an object can never remove a deletion timestamp or clear/change grace period seconds
+ if !oldMeta.DeletionTimestamp.IsZero() {
+ newMeta.DeletionTimestamp = oldMeta.DeletionTimestamp
+ }
+ if oldMeta.DeletionGracePeriodSeconds != nil && newMeta.DeletionGracePeriodSeconds == nil {
+ newMeta.DeletionGracePeriodSeconds = oldMeta.DeletionGracePeriodSeconds
+ }
+ }
+
+ // TODO: needs to check if newMeta==nil && oldMeta !=nil after the repair logic is removed.
+ if newMeta.DeletionGracePeriodSeconds != nil && (oldMeta.DeletionGracePeriodSeconds == nil || *newMeta.DeletionGracePeriodSeconds != *oldMeta.DeletionGracePeriodSeconds) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionGracePeriodSeconds"), newMeta.DeletionGracePeriodSeconds, "field is immutable; may only be changed via deletion"))
+ }
+ if newMeta.DeletionTimestamp != nil && (oldMeta.DeletionTimestamp == nil || !newMeta.DeletionTimestamp.Equal(*oldMeta.DeletionTimestamp)) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionTimestamp"), newMeta.DeletionTimestamp, "field is immutable; may only be changed via deletion"))
+ }
+
+ // Reject updates that don't specify a resource version
+ if len(newMeta.ResourceVersion) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceVersion"), newMeta.ResourceVersion, "must be specified for an update"))
+ }
+
+ // Generation shouldn't be decremented
+ if newMeta.Generation < oldMeta.Generation {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("generation"), newMeta.Generation, "must not be decremented"))
+ }
+
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.Name, oldMeta.Name, fldPath.Child("name"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.Namespace, oldMeta.Namespace, fldPath.Child("namespace"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.UID, oldMeta.UID, fldPath.Child("uid"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.CreationTimestamp, oldMeta.CreationTimestamp, fldPath.Child("creationTimestamp"))...)
+
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabels(newMeta.Labels, fldPath.Child("labels"))...)
+ allErrs = append(allErrs, ValidateAnnotations(newMeta.Annotations, fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidateOwnerReferences(newMeta.OwnerReferences, fldPath.Child("ownerReferences"))...)
+
+ return allErrs
+}
+
+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++
+ // EmptyDirs have nothing to validate
+ }
+ 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.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 specifiy 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 specifiy more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateConfigMapVolumeSource(source.ConfigMap, fldPath.Child("configMap"))...)
+ }
+ }
+ if source.AzureFile != nil {
+ 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 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
+}
+
+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 := validateVolumeSourcePath(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)))
+ }
+ 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"), ""))
+ }
+ 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"), ""))
+ }
+ 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 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 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("datasetName"), ""))
+ }
+ 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 validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, downwardAPIVolumeFile := range downwardAPIVolume.Items {
+ if len(downwardAPIVolumeFile.Path) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ }
+ allErrs = append(allErrs, validateVolumeSourcePath(downwardAPIVolumeFile.Path, fldPath.Child("path"))...)
+ if downwardAPIVolumeFile.FieldRef != nil {
+ allErrs = append(allErrs, validateObjectFieldSelector(downwardAPIVolumeFile.FieldRef, &validDownwardAPIFieldPathExpressions, fldPath.Child("fieldRef"))...)
+ if downwardAPIVolumeFile.ResourceFieldRef != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, "resource", "fieldRef and resourceFieldRef can not be specified simultaneously"))
+ }
+ } else if downwardAPIVolumeFile.ResourceFieldRef != nil {
+ allErrs = append(allErrs, validateContainerResourceFieldSelector(downwardAPIVolumeFile.ResourceFieldRef, &validContainerResourceFieldPathExpressions, fldPath.Child("resourceFieldRef"), true)...)
+ } else {
+ allErrs = append(allErrs, field.Required(fldPath, "one of fieldRef and resourceFieldRef is required"))
+ }
+ }
+ return allErrs
+}
+
+// This validate will make sure targetPath:
+// 1. is not abs path
+// 2. does not start with '../'
+// 3. does not contain '/../'
+// 4. does not end with '/..'
+func validateSubPath(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"))
+ }
+ if strings.HasPrefix(targetPath, "../") {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not start with '../'"))
+ }
+ if strings.Contains(targetPath, "/../") {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '/../'"))
+ }
+ if strings.HasSuffix(targetPath, "/..") {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not end with '/..'"))
+ }
+ return allErrs
+}
+
+// This validate will make sure targetPath:
+// 1. is not abs path
+// 2. does not contain '..'
+// 3. does not start with '..'
+func validateVolumeSourcePath(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"))
+ }
+ // TODO assume OS of api server & nodes are the same for now
+ items := strings.Split(targetPath, string(os.PathSeparator))
+
+ for _, item := range items {
+ if item == ".." {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
+ }
+ }
+ if strings.HasPrefix(items[0], "..") && len(items[0]) > 2 {
+ 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"), ""))
+ }
+ 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 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
+}
+
+// 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))
+
+func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
+ allErrs := ValidateObjectMeta(&pv.ObjectMeta, false, ValidatePersistentVolumeName, field.NewPath("metadata"))
+
+ 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)))...)
+ }
+
+ 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.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 {
+ 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 numVolumes == 0 {
+ allErrs = append(allErrs, field.Required(specPath, "must specify a volume type"))
+ }
+ 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
+}
+
+func ValidatePersistentVolumeClaim(pvc *api.PersistentVolumeClaim) field.ErrorList {
+ allErrs := ValidateObjectMeta(&pvc.ObjectMeta, true, ValidatePersistentVolumeName, field.NewPath("metadata"))
+ specPath := field.NewPath("spec")
+ if len(pvc.Spec.AccessModes) == 0 {
+ allErrs = append(allErrs, field.Required(specPath.Child("accessModes"), "at least 1 accessMode is required"))
+ }
+ if pvc.Spec.Selector != nil {
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(pvc.Spec.Selector, specPath.Child("selector"))...)
+ }
+ for _, mode := range pvc.Spec.AccessModes {
+ if mode != api.ReadWriteOnce && mode != api.ReadOnlyMany && mode != api.ReadWriteMany {
+ allErrs = append(allErrs, field.NotSupported(specPath.Child("accessModes"), mode, supportedAccessModes.List()))
+ }
+ }
+ if _, ok := pvc.Spec.Resources.Requests[api.ResourceStorage]; !ok {
+ allErrs = append(allErrs, field.Required(specPath.Child("resources").Key(string(api.ResourceStorage)), ""))
+ }
+ return allErrs
+}
+
+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/annotations are OK.
+ // no-op updates pass validation.
+ if !api.Semantic.DeepEqual(newPvc.Spec, oldPvc.Spec) {
+ allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "field is immutable after creation"))
+ }
+ newPvc.Status = oldPvc.Status
+ return allErrs
+}
+
+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
+}
+
+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", "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 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
+}
+
+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, fmt.Sprintf("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, fmt.Sprintf("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{}
+
+ if len(s.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ }
+ 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{}
+
+ if len(s.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ }
+ 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"), ""))
+ } else if strings.Contains(mnt.MountPath, ":") {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("mountPath"), mnt.MountPath, "must not contain ':'"))
+ }
+ 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, validateSubPath(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("%d/%s", port, ctr.Ports[pi].Protocol)
+ 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)
+ }
+ 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"))
+ }
+
+ 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, 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.DNSClusterFirst, api.DNSDefault:
+ break
+ case "":
+ allErrors = append(allErrors, field.Required(fldPath, ""))
+ default:
+ validValues := []string{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
+}
+
+// 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
+}
+
+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, TaintEffectNoScheduleNoAdmitNoExecute.
+ case api.TaintEffectNoSchedule, api.TaintEffectPreferNoSchedule:
+ // case api.TaintEffectNoSchedule, api.TaintEffectPreferNoSchedule, api.TaintEffectNoScheduleNoAdmit, api.TaintEffectNoScheduleNoAdmitNoExecute:
+ default:
+ validValues := []string{
+ string(api.TaintEffectNoSchedule),
+ string(api.TaintEffectPreferNoSchedule),
+ // TODO: Uncomment this block when implement TaintEffectNoScheduleNoAdmit, TaintEffectNoScheduleNoAdmitNoExecute.
+ // string(api.TaintEffectNoScheduleNoAdmit),
+ // string(api.TaintEffectNoScheduleNoAdmitNoExecute),
+ }
+ allErrors = append(allErrors, field.NotSupported(fldPath, effect, validValues))
+ }
+ return allErrors
+}
+
+// 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
+ allErrors = append(allErrors, unversionedvalidation.ValidateLabelName(toleration.Key, idxPath.Child("key"))...)
+
+ // validate toleration operator and value
+ switch toleration.Operator {
+ 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
+ if len(toleration.Effect) > 0 {
+ allErrors = append(allErrors, validateTaintEffect(&toleration.Effect, true, idxPath.Child("effect"))...)
+ }
+ }
+ return allErrors
+}
+
+// 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, fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidatePodSpec(&pod.Spec, field.NewPath("spec"))...)
+ 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"))...)
+ 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 {
+ if *spec.ActiveDeadlineSeconds <= 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("activeDeadlineSeconds"), spec.ActiveDeadlineSeconds, "must be greater than 0"))
+ }
+ }
+
+ 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"))...)
+ }
+
+ 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
+}
+
+// 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{}
+ 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
+}
+
+// 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 := api.GetAffinityFromPodAnnotations(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, api.AffinityAnnotationKey, err.Error()))
+ return allErrs
+ }
+
+ affinityFldPath := fldPath.Child(api.AffinityAnnotationKey)
+ if affinity.NodeAffinity != nil {
+ na := affinity.NodeAffinity
+ naFldPath := affinityFldPath.Child("nodeAffinity")
+ // TODO: Uncomment the next three lines once RequiredDuringSchedulingRequiredDuringExecution is implemented.
+ // if na.RequiredDuringSchedulingRequiredDuringExecution != nil {
+ // allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingRequiredDuringExecution, naFldPath.Child("requiredDuringSchedulingRequiredDuringExecution"))...)
+ // }
+
+ if na.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingIgnoredDuringExecution, naFldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+
+ if len(na.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ allErrs = append(allErrs, ValidatePreferredSchedulingTerms(na.PreferredDuringSchedulingIgnoredDuringExecution, naFldPath.Child("preferredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+ }
+ if affinity.PodAffinity != nil {
+ allErrs = append(allErrs, validatePodAffinity(affinity.PodAffinity, affinityFldPath.Child("podAffinity"))...)
+ }
+ if affinity.PodAntiAffinity != nil {
+ allErrs = append(allErrs, validatePodAntiAffinity(affinity.PodAntiAffinity, affinityFldPath.Child("podAntiAffinity"))...)
+ }
+
+ 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 := api.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
+}
+
+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 validateSubPath(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
+}
+
+// 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"))...)
+ 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
+}
+
+// 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, ValidatePodSpecificAnnotations(newPod.ObjectMeta.Annotations, fldPath.Child("annotations"))...)
+ specPath := field.NewPath("spec")
+ if len(newPod.Spec.Containers) != len(oldPod.Spec.Containers) {
+ //TODO: Pinpoint the specific container that causes the invalid error after we have strategic merge diff
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("containers"), "pod updates may not add or remove containers"))
+ return allErrs
+ }
+
+ // validate updateable fields:
+ // 1. containers[*].image
+ // 2. spec.activeDeadlineSeconds
+
+ // validate updated container images
+ for i, ctr := range newPod.Spec.Containers {
+ if len(ctr.Image) == 0 {
+ allErrs = append(allErrs, field.Required(specPath.Child("containers").Index(i).Child("image"), ""))
+ }
+ }
+
+ // 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 {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("activeDeadlineSeconds"), newActiveDeadlineSeconds, isNegativeErrorMsg))
+ 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
+ // munge 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.activeDeadlineSeconds
+ mungedPod.Spec.ActiveDeadlineSeconds = nil
+ if oldPod.Spec.ActiveDeadlineSeconds != nil {
+ activeDeadlineSeconds := *oldPod.Spec.ActiveDeadlineSeconds
+ mungedPod.Spec.ActiveDeadlineSeconds = &activeDeadlineSeconds
+ }
+ if !api.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 `containers[*].image` or `spec.activeDeadlineSeconds`"))
+ }
+
+ 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 {
+ allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, field.NewPath("metadata"))
+
+ // TODO: allow change when bindings are properly decoupled from pods
+ 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))
+
+// ValidateService tests if required fields in the service are set.
+func ValidateService(service *api.Service) field.ErrorList {
+ allErrs := ValidateObjectMeta(&service.ObjectMeta, true, ValidateServiceName, field.NewPath("metadata"))
+
+ specPath := field.NewPath("spec")
+ if len(service.Spec.Ports) == 0 && service.Spec.ClusterIP != api.ClusterIPNone {
+ allErrs = append(allErrs, field.Required(specPath.Child("ports"), ""))
+ }
+ if service.Spec.Type == 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"))
+ }
+ }
+ }
+
+ isHeadlessService := service.Spec.ClusterIP == api.ClusterIPNone
+ 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 api.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[apiservice.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(apiservice.AnnotationLoadBalancerSourceRangesKey)
+ val = service.Annotations[apiservice.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 "))
+ }
+ }
+ 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
+}
+
+// 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"))
+
+ if api.IsServiceIPSet(oldService) {
+ 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"))
+ statusPath := field.NewPath("status")
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(controller.Status.Replicas), statusPath.Child("replicas"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(controller.Status.FullyLabeledReplicas), statusPath.Child("fullyLabeledReplicas"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(controller.Status.ObservedGeneration), statusPath.Child("observedGeneration"))...)
+ 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)}))
+ }
+ }
+ 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, 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, 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
+}
+
+// validateTaints tests if given taints have valid data.
+func validateTaints(taints []api.Taint, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ 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"))...)
+ }
+ return allErrors
+}
+
+// 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 := api.GetTaintsFromNodeAnnotations(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, api.TaintsAnnotationKey, err.Error()))
+ return allErrs
+ }
+ if len(taints) > 0 {
+ allErrs = append(allErrs, validateTaints(taints, fldPath.Child(api.TaintsAnnotationKey))...)
+ }
+
+ return allErrs
+}
+
+func ValidateNodeSpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ if annotations[api.TaintsAnnotationKey] != "" {
+ return ValidateTaintsInNodeAnnotations(annotations, fldPath)
+ }
+ return field.ErrorList{}
+}
+
+// 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"))...)
+
+ // 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 !api.Semantic.DeepEqual(node.Status, api.NodeStatus{}) {
+ // allErrs = append(allErrs, field.Invalid("status", node.Status, "must be empty"))
+ // }
+
+ // 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"))
+ }
+ }
+ // 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
+
+ // TODO: Add a 'real' error type for this error and provide print actual diffs.
+ if !api.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 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 !api.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 !api.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 !api.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 !api.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
+ }
+ }
+
+ 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)...)
+ if api.IsStandardResourceName(string(resourceName)) {
+ allErrs = append(allErrs, validateBasicResource(quantity, fldPath.Key(string(resourceName)))...)
+ }
+ // Check that request <= limit.
+ requestQuantity, exists := requirements.Requests[resourceName]
+ if exists {
+ // For GPUs, require that no request be set.
+ if resourceName == api.ResourceNvidiaGPU {
+ allErrs = append(allErrs, field.Invalid(reqPath, requestQuantity.String(), "cannot be set"))
+ } else if quantity.Cmp(requestQuantity) < 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, quantity.String(), "must be greater than or equal to request"))
+ }
+ }
+ }
+ for resourceName, quantity := range requirements.Requests {
+ fldPath := reqPath.Key(string(resourceName))
+ // Validate resource name.
+ allErrs = append(allErrs, validateContainerResourceName(string(resourceName), fldPath)...)
+ if api.IsStandardResourceName(string(resourceName)) {
+ allErrs = append(allErrs, validateBasicResource(quantity, fldPath.Key(string(resourceName)))...)
+ }
+ }
+ 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 !api.IsStandardResourceQuotaScope(string(scope)) {
+ allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "unsupported scope"))
+ }
+ for _, k := range hardLimits.List() {
+ if api.IsStandardQuotaResourceName(k) && !api.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 api.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, "field is immutable"))
+ }
+
+ 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 := field.ErrorList{}
+ for _, msg := range validation.IsQualifiedName(stringValue) {
+ allErrs = append(allErrs, field.Invalid(fldPath, stringValue, msg))
+ }
+ if len(allErrs) != 0 {
+ return allErrs
+ }
+
+ if len(strings.Split(stringValue, "/")) == 1 {
+ if !api.IsStandardFinalizerName(stringValue) {
+ return append(allErrs, field.Invalid(fldPath, stringValue, fmt.Sprintf("name is neither a standard finalizer name nor is it fully qualified")))
+ }
+ }
+
+ return field.ErrorList{}
+}
+
+// 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
+}
+
+// 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, field.NewPath("subsets"))...)
+ return allErrs
+}
+
+func validateEndpointSubsets(subsets []api.EndpointSubset, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ 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))...)
+ }
+ for addr := range ss.NotReadyAddresses {
+ allErrs = append(allErrs, validateEndpointAddress(&ss.NotReadyAddresses[addr], idxPath.Child("notReadyAddresses").Index(addr))...)
+ }
+ 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) 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"))...)
+ }
+ 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, 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 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
+}
+
+// TODO: remove this after we EOL the annotation that carries it.
+func isValidHostnamesMap(serializedPodHostNames string) bool {
+ if len(serializedPodHostNames) == 0 {
+ return false
+ }
+ podHostNames := map[string]endpoints.HostRecord{}
+ err := json.Unmarshal([]byte(serializedPodHostNames), &podHostNames)
+ if err != nil {
+ return false
+ }
+
+ for ip, hostRecord := range podHostNames {
+ if len(validation.IsDNS1123Label(hostRecord.HostName)) != 0 {
+ return false
+ }
+ if net.ParseIP(ip) == nil {
+ return false
+ }
+ }
+ return true
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/doc.go
new file mode 100644
index 0000000..ede22b3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go
new file mode 100644
index 0000000..307f55d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go
@@ -0,0 +1,346 @@
+/*
+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"
+ "os"
+ "sort"
+ "strings"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+var (
+ // registeredGroupVersions stores all API group versions for which RegisterGroup is called.
+ registeredVersions = map[unversioned.GroupVersion]struct{}{}
+
+ // thirdPartyGroupVersions are API versions which are dynamically
+ // registered (and unregistered) via API calls to the apiserver
+ thirdPartyGroupVersions []unversioned.GroupVersion
+
+ // enabledVersions represents all enabled API versions. It should be a
+ // subset of registeredVersions. Please call EnableVersions() to add
+ // enabled versions.
+ enabledVersions = map[unversioned.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 = []unversioned.GroupVersion{}
+)
+
+func init() {
+ // Env var KUBE_API_VERSIONS is a comma separated list of API versions that
+ // should be registered in the scheme.
+ kubeAPIVersions := os.Getenv("KUBE_API_VERSIONS")
+ if len(kubeAPIVersions) != 0 {
+ for _, version := range strings.Split(kubeAPIVersions, ",") {
+ gv, err := unversioned.ParseGroupVersion(version)
+ if err != nil {
+ glog.Fatalf("invalid api version: %s in KUBE_API_VERSIONS: %s.",
+ version, os.Getenv("KUBE_API_VERSIONS"))
+ }
+ envRequestedVersions = append(envRequestedVersions, gv)
+ }
+ }
+}
+
+// RegisterVersions adds the given group versions to the list of registered group versions.
+func RegisterVersions(availableVersions []unversioned.GroupVersion) {
+ for _, v := range availableVersions {
+ registeredVersions[v] = struct{}{}
+ }
+}
+
+// RegisterGroup adds the given group to the list of registered groups.
+func RegisterGroup(groupMeta apimachinery.GroupMeta) error {
+ groupName := groupMeta.GroupVersion.Group
+ if _, found := groupMetaMap[groupName]; found {
+ return fmt.Errorf("group %v is already registered", groupMetaMap)
+ }
+ 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 EnableVersions(versions ...unversioned.GroupVersion) error {
+ var unregisteredVersions []unversioned.GroupVersion
+ for _, v := range versions {
+ if _, found := registeredVersions[v]; !found {
+ unregisteredVersions = append(unregisteredVersions, v)
+ }
+ 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 IsAllowedVersion(v unversioned.GroupVersion) bool {
+ if len(envRequestedVersions) == 0 {
+ return true
+ }
+ for _, envGV := range envRequestedVersions {
+ if v == envGV {
+ return true
+ }
+ }
+ return false
+}
+
+// IsEnabledVersion returns if a version is enabled.
+func IsEnabledVersion(v unversioned.GroupVersion) bool {
+ _, found := 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 EnabledVersions() []unversioned.GroupVersion {
+ ret := []unversioned.GroupVersion{}
+ for _, groupMeta := range groupMetaMap {
+ ret = append(ret, groupMeta.GroupVersions...)
+ }
+ return ret
+}
+
+// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst
+func EnabledVersionsForGroup(group string) []unversioned.GroupVersion {
+ groupMeta, ok := groupMetaMap[group]
+ if !ok {
+ return []unversioned.GroupVersion{}
+ }
+
+ return append([]unversioned.GroupVersion{}, groupMeta.GroupVersions...)
+}
+
+// Group returns the metadata of a group if the gruop is registered, otherwise
+// an erorr is returned.
+func Group(group string) (*apimachinery.GroupMeta, error) {
+ groupMeta, found := 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 IsRegistered(group string) bool {
+ _, found := groupMetaMap[group]
+ return found
+}
+
+// IsRegisteredVersion returns if a version is registered.
+func IsRegisteredVersion(v unversioned.GroupVersion) bool {
+ _, found := registeredVersions[v]
+ return found
+}
+
+// RegisteredGroupVersions returns all registered group versions.
+func RegisteredGroupVersions() []unversioned.GroupVersion {
+ ret := []unversioned.GroupVersion{}
+ for groupVersion := range registeredVersions {
+ ret = append(ret, groupVersion)
+ }
+ return ret
+}
+
+// IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version.
+func IsThirdPartyAPIGroupVersion(gv unversioned.GroupVersion) bool {
+ for ix := range thirdPartyGroupVersions {
+ if 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 AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversioned.GroupVersion {
+ filteredGVs := []unversioned.GroupVersion{}
+ skippedGVs := []unversioned.GroupVersion{}
+ for ix := range gvs {
+ if !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
+ }
+ RegisterVersions(filteredGVs)
+ EnableVersions(filteredGVs...)
+ next := make([]unversioned.GroupVersion, len(gvs))
+ for ix := range filteredGVs {
+ next[ix] = filteredGVs[ix]
+ }
+ thirdPartyGroupVersions = next
+
+ return skippedGVs
+}
+
+// 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 GroupOrDie(group string) *apimachinery.GroupMeta {
+ groupMeta, found := 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 RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper {
+ unionMapper := meta.MultiRESTMapper{}
+ unionedGroups := sets.NewString()
+ for enabledVersion := range enabledVersions {
+ if !unionedGroups.Has(enabledVersion.Group) {
+ unionedGroups.Insert(enabledVersion.Group)
+ groupMeta := groupMetaMap[enabledVersion.Group]
+ unionMapper = append(unionMapper, groupMeta.RESTMapper)
+ }
+ }
+
+ if len(versionPatterns) != 0 {
+ resourcePriority := []unversioned.GroupVersionResource{}
+ kindPriority := []unversioned.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(envRequestedVersions) != 0 {
+ resourcePriority := []unversioned.GroupVersionResource{}
+ kindPriority := []unversioned.GroupVersionKind{}
+
+ for _, versionPriority := range 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 := prioritiesForGroups(prioritizedGroups...)
+
+ prioritizedGroupsSet := sets.NewString(prioritizedGroups...)
+ remainingGroups := sets.String{}
+ for enabledVersion := range enabledVersions {
+ if !prioritizedGroupsSet.Has(enabledVersion.Group) {
+ remainingGroups.Insert(enabledVersion.Group)
+ }
+ }
+
+ remainingResourcePriority, remainingKindPriority := 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 prioritiesForGroups(groups ...string) ([]unversioned.GroupVersionResource, []unversioned.GroupVersionKind) {
+ resourcePriority := []unversioned.GroupVersionResource{}
+ kindPriority := []unversioned.GroupVersionKind{}
+
+ for _, group := range groups {
+ availableVersions := 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, unversioned.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource})
+ kindPriority = append(kindPriority, unversioned.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 AllPreferredGroupVersions() string {
+ if len(groupMetaMap) == 0 {
+ return ""
+ }
+ var defaults []string
+ for _, groupMeta := range 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 ValidateEnvRequestedVersions() []unversioned.GroupVersion {
+ var missingVersions []unversioned.GroupVersion
+ for _, v := range envRequestedVersions {
+ if _, found := enabledVersions[v]; !found {
+ missingVersions = append(missingVersions, v)
+ }
+ }
+ return missingVersions
+}
+
+// Resets the state.
+// Should not be used by anyone else than tests.
+func reset() {
+ registeredVersions = map[unversioned.GroupVersion]struct{}{}
+ enabledVersions = map[unversioned.GroupVersion]struct{}{}
+ groupMetaMap = map[string]*apimachinery.GroupMeta{}
+
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/types.go
new file mode 100644
index 0000000..0e90cbb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apimachinery/types.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 apimachinery
+
+import (
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupMeta stores the metadata of a group.
+type GroupMeta struct {
+ // GroupVersion represents the preferred version of the group.
+ GroupVersion unversioned.GroupVersion
+
+ // GroupVersions is Group + all versions in that group.
+ GroupVersions []unversioned.GroupVersion
+
+ // Codec is the default codec for serializing output that should use
+ // the preferred version. Use this Codec when writing to
+ // disk, a data store that is not dynamically versioned, or in tests.
+ // This codec can decode any object that the schema is aware of.
+ Codec runtime.Codec
+
+ // 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
+ // or an error if the version is not known.
+ InterfacesFor func(version unversioned.GroupVersion) (*meta.VersionInterfaces, error)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/deep_copy_generated.go
new file mode 100644
index 0000000..bdeb0b1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/deep_copy_generated.go
@@ -0,0 +1,111 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_apps_PetSet,
+ DeepCopy_apps_PetSetList,
+ DeepCopy_apps_PetSetSpec,
+ DeepCopy_apps_PetSetStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_apps_PetSet(in PetSet, out *PetSet, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_apps_PetSetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_apps_PetSetStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_apps_PetSetList(in PetSetList, out *PetSetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]PetSet, len(in))
+ for i := range in {
+ if err := DeepCopy_apps_PetSet(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_apps_PetSetSpec(in PetSetSpec, out *PetSetSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.VolumeClaimTemplates = nil
+ }
+ out.ServiceName = in.ServiceName
+ return nil
+}
+
+func DeepCopy_apps_PetSetStatus(in PetSetStatus, out *PetSetStatus, c *conversion.Cloner) error {
+ if in.ObservedGeneration != nil {
+ in, out := in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ObservedGeneration = nil
+ }
+ out.Replicas = in.Replicas
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go
new file mode 100644
index 0000000..bca1ff4
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go
new file mode 100644
index 0000000..346740e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go
@@ -0,0 +1,125 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/apis/apps/v1alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/apps"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", apps.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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()
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(apps.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ apps.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1alpha1.SchemeGroupVersion:
+ v1alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go
new file mode 100644
index 0000000..90acc12
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// GroupName is the group name use in this package
+const GroupName = "apps"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ // TODO this will get cleaned up with the scheme types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PetSet{},
+ &PetSetList{},
+ &api.ListOptions{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.generated.go
new file mode 100644
index 0000000..be8a54a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.generated.go
@@ -0,0 +1,1634 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 apps
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_api "k8s.io/kubernetes/pkg/api"
+ pkg4_resource "k8s.io/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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_api.ObjectMeta
+ var v1 pkg4_resource.Quantity
+ var v2 pkg1_unversioned.TypeMeta
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PetSetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PetSetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSet) 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PetSetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PetSetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.Replicas != 0
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = len(x.VolumeClaimTemplates) != 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.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_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)
+ yy10 := &x.Template
+ yy10.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.VolumeClaimTemplates == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceapi_PersistentVolumeClaim(([]pkg2_api.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 {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceapi_PersistentVolumeClaim(([]pkg2_api.PersistentVolumeClaim)(x.VolumeClaimTemplates), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_unversioned.LabelSelector)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv7 := &x.Template
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "volumeClaimTemplates":
+ if r.TryDecodeAsNil() {
+ x.VolumeClaimTemplates = nil
+ } else {
+ yyv8 := &x.VolumeClaimTemplates
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceapi_PersistentVolumeClaim((*[]pkg2_api.PersistentVolumeClaim)(yyv8), d)
+ }
+ }
+ case "serviceName":
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ x.ServiceName = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSetSpec) 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.Replicas = 0
+ } else {
+ x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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_unversioned.LabelSelector)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ 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 = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv15 := &x.Template
+ yyv15.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.VolumeClaimTemplates = nil
+ } else {
+ yyv16 := &x.VolumeClaimTemplates
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceapi_PersistentVolumeClaim((*[]pkg2_api.PersistentVolumeClaim)(yyv16), 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.ServiceName = ""
+ } else {
+ x.ServiceName = string(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 *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.ObservedGeneration != 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 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_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSetStatus) 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.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.Replicas = 0
+ } else {
+ x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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 *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSlicePetSet(([]PetSet)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePetSet(([]PetSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePetSet((*[]PetSet)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSetList) 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePetSet((*[]PetSet)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) encSliceapi_PersistentVolumeClaim(v []pkg2_api.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) decSliceapi_PersistentVolumeClaim(v *[]pkg2_api.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 = []pkg2_api.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, 352)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg2_api.PersistentVolumeClaim, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_api.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] = pkg2_api.PersistentVolumeClaim{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg2_api.PersistentVolumeClaim{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_api.PersistentVolumeClaim{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg2_api.PersistentVolumeClaim{}) // var yyz1 pkg2_api.PersistentVolumeClaim
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_api.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 = []pkg2_api.PersistentVolumeClaim{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePetSet(v []PetSet, 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) decSlicePetSet(v *[]PetSet, 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 = []PetSet{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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, 744)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PetSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PetSet, 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] = PetSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PetSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PetSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PetSet{}) // var yyz1 PetSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PetSet{}
+ } 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 = []PetSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go
new file mode 100644
index 0000000..c3e2897
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go
@@ -0,0 +1,94 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// PetSet 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 PetSet guarantees that a given network identity will always
+// map to the same storage identity. PetSet is currently in alpha and
+// and subject to change without notice.
+type PetSet struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the desired identities of pets in this set.
+ Spec PetSetSpec `json:"spec,omitempty"`
+
+ // Status is the current status of Pets in this PetSet. This data
+ // may be out of date by some window of time.
+ Status PetSetStatus `json:"status,omitempty"`
+}
+
+// A PetSetSpec is the specification of a PetSet.
+type PetSetSpec 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.
+ Replicas int `json:"replicas,omitempty"`
+
+ // Selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the PetSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the PetSet.
+ Template api.PodTemplateSpec `json:"template"`
+
+ // VolumeClaimTemplates is a list of claims that pets are allowed to reference.
+ // The PetSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pet. 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.
+ VolumeClaimTemplates []api.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
+
+ // ServiceName is the name of the service that governs this PetSet.
+ // This service must exist before the PetSet, and is responsible for
+ // the network identity of the set. Pets get DNS/hostnames that follow the
+ // pattern: pet-specific-string.serviceName.default.svc.cluster.local
+ // where "pet-specific-string" is managed by the PetSet controller.
+ ServiceName string `json:"serviceName"`
+}
+
+// PetSetStatus represents the current state of a PetSet.
+type PetSetStatus struct {
+ // most recent generation observed by this autoscaler.
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
+
+ // Replicas is the number of actual replicas.
+ Replicas int `json:"replicas"`
+}
+
+// PetSetList is a collection of PetSets.
+type PetSetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+ Items []PetSet `json:"items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion.go
new file mode 100644
index 0000000..b2fb1be
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // Add non-generated conversion functions to handle the *int32 -> int
+ // 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_v1alpha1_PetSetSpec_To_apps_PetSetSpec,
+ Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
+ )
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+
+ err = api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "PetSet",
+ 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: %s", label)
+ }
+ })
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = int(*in.Replicas)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(unversioned.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
+ }
+ out.ServiceName = in.ServiceName
+ return nil
+}
+
+func Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out *PetSetSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = int32(in.Replicas)
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(unversioned.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
+ }
+ out.ServiceName = in.ServiceName
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion_generated.go
new file mode 100644
index 0000000..3cf4728
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/conversion_generated.go
@@ -0,0 +1,156 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ apps "k8s.io/kubernetes/pkg/apis/apps"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PetSet_To_apps_PetSet,
+ Convert_apps_PetSet_To_v1alpha1_PetSet,
+ Convert_v1alpha1_PetSetList_To_apps_PetSetList,
+ Convert_apps_PetSetList_To_v1alpha1_PetSetList,
+ Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec,
+ Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
+ Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus,
+ Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
+ SetDefaults_PetSet(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PetSet_To_apps_PetSet(in, out, s)
+}
+
+func autoConvert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error {
+ return autoConvert_apps_PetSet_To_v1alpha1_PetSet(in, out, s)
+}
+
+func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]apps.PetSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PetSet_To_apps_PetSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in, out, s)
+}
+
+func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PetSet, len(*in))
+ for i := range *in {
+ if err := Convert_apps_PetSet_To_v1alpha1_PetSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error {
+ return autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = int(in.Replicas)
+ return nil
+}
+
+func Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in, out, s)
+}
+
+func autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = int32(in.Replicas)
+ return nil
+}
+
+func Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error {
+ return autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..8718942
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/deep_copy_generated.go
@@ -0,0 +1,118 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1alpha1_PetSet,
+ DeepCopy_v1alpha1_PetSetList,
+ DeepCopy_v1alpha1_PetSetSpec,
+ DeepCopy_v1alpha1_PetSetStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1alpha1_PetSet(in PetSet, out *PetSet, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1alpha1_PetSetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1alpha1_PetSetStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PetSetList(in PetSetList, out *PetSetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]PetSet, len(in))
+ for i := range in {
+ if err := DeepCopy_v1alpha1_PetSet(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PetSetSpec(in PetSetSpec, out *PetSetSpec, c *conversion.Cloner) error {
+ if in.Replicas != nil {
+ in, out := in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Replicas = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := 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([]v1.PersistentVolumeClaim, len(in))
+ for i := range in {
+ if err := v1.DeepCopy_v1_PersistentVolumeClaim(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeClaimTemplates = nil
+ }
+ out.ServiceName = in.ServiceName
+ return nil
+}
+
+func DeepCopy_v1alpha1_PetSetStatus(in PetSetStatus, out *PetSetStatus, c *conversion.Cloner) error {
+ if in.ObservedGeneration != nil {
+ in, out := in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ObservedGeneration = nil
+ }
+ out.Replicas = in.Replicas
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/defaults.go
new file mode 100644
index 0000000..e578e8c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/defaults.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 v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_PetSet,
+ )
+}
+
+func SetDefaults_PetSet(obj *PetSet) {
+ labels := obj.Spec.Template.Labels
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &unversioned.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
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/doc.go
new file mode 100644
index 0000000..53d9fca
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
+
+package v1alpha1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.pb.go
new file mode 100644
index 0000000..7e76067
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.pb.go
@@ -0,0 +1,969 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/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/apps/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PetSet
+ PetSetList
+ PetSetSpec
+ PetSetStatus
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *PetSet) Reset() { *m = PetSet{} }
+func (m *PetSet) String() string { return proto.CompactTextString(m) }
+func (*PetSet) ProtoMessage() {}
+
+func (m *PetSetList) Reset() { *m = PetSetList{} }
+func (m *PetSetList) String() string { return proto.CompactTextString(m) }
+func (*PetSetList) ProtoMessage() {}
+
+func (m *PetSetSpec) Reset() { *m = PetSetSpec{} }
+func (m *PetSetSpec) String() string { return proto.CompactTextString(m) }
+func (*PetSetSpec) ProtoMessage() {}
+
+func (m *PetSetStatus) Reset() { *m = PetSetStatus{} }
+func (m *PetSetStatus) String() string { return proto.CompactTextString(m) }
+func (*PetSetStatus) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*PetSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet")
+ proto.RegisterType((*PetSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetList")
+ proto.RegisterType((*PetSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetSpec")
+ proto.RegisterType((*PetSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetStatus")
+}
+func (m *PetSet) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PetSet) 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 *PetSetList) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PetSetList) 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 *PetSetSpec) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PetSetSpec) 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()))
+ n5, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Template.Size()))
+ n6, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ 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)
+ return i, nil
+}
+
+func (m *PetSetStatus) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PetSetStatus) 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))
+ 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 *PetSet) 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 *PetSetList) 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 *PetSetSpec) 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))
+ return n
+}
+
+func (m *PetSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ 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 *PetSet) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PetSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PetSet: 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 *PetSetList) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PetSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PetSetList: 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, PetSet{})
+ 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 *PetSetSpec) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PetSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PetSetSpec: 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_kubernetes_pkg_api_unversioned.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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PetSetStatus) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PetSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PetSetStatus: 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
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto
new file mode 100644
index 0000000..92bdd6b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto
@@ -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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.apps.v1alpha1;
+
+import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PetSet 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 PetSet guarantees that a given network identity will always
+// map to the same storage identity. PetSet is currently in alpha
+// and subject to change without notice.
+message PetSet {
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired identities of pets in this set.
+ optional PetSetSpec spec = 2;
+
+ // Status is the current status of Pets in this PetSet. This data
+ // may be out of date by some window of time.
+ optional PetSetStatus status = 3;
+}
+
+// PetSetList is a collection of PetSets.
+message PetSetList {
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ repeated PetSet items = 2;
+}
+
+// A PetSetSpec is the specification of a PetSet.
+message PetSetSpec {
+ // 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 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 PetSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the PetSet.
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // VolumeClaimTemplates is a list of claims that pets are allowed to reference.
+ // The PetSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pet. 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.
+ repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
+
+ // ServiceName is the name of the service that governs this PetSet.
+ // This service must exist before the PetSet, and is responsible for
+ // the network identity of the set. Pets get DNS/hostnames that follow the
+ // pattern: pet-specific-string.serviceName.default.svc.cluster.local
+ // where "pet-specific-string" is managed by the PetSet controller.
+ optional string serviceName = 5;
+}
+
+// PetSetStatus represents the current state of a PetSet.
+message PetSetStatus {
+ // most recent generation observed by this autoscaler.
+ optional int64 observedGeneration = 1;
+
+ // Replicas is the number of actual replicas.
+ optional int32 replicas = 2;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/register.go
new file mode 100644
index 0000000..9fd138c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "apps"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PetSet{},
+ &PetSetList{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
+
+func (obj *PetSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
+func (obj *PetSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.generated.go
new file mode 100644
index 0000000..d036392
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.generated.go
@@ -0,0 +1,1664 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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"
+ pkg4_resource "k8s.io/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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 pkg4_resource.Quantity
+ var v1 pkg1_unversioned.TypeMeta
+ var v2 pkg2_v1.ObjectMeta
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PetSetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PetSetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSet) 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PetSetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PetSetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = len(x.VolumeClaimTemplates) != 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] {
+ 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(([]pkg2_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(([]pkg2_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_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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_unversioned.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 = pkg2_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((*[]pkg2_v1.PersistentVolumeClaim)(yyv9), d)
+ }
+ }
+ case "serviceName":
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ x.ServiceName = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSetSpec) 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.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_unversioned.LabelSelector)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv17 := &x.Template
+ yyv17.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.VolumeClaimTemplates = nil
+ } else {
+ yyv18 := &x.VolumeClaimTemplates
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv18), 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.ServiceName = ""
+ } else {
+ x.ServiceName = string(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 *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.ObservedGeneration != 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 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_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSetStatus) 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.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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 *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSlicePetSet(([]PetSet)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePetSet(([]PetSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePetSet((*[]PetSet)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PetSetList) 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePetSet((*[]PetSet)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) encSlicev1_PersistentVolumeClaim(v []pkg2_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 *[]pkg2_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 = []pkg2_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, 352)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_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] = pkg2_v1.PersistentVolumeClaim{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) // var yyz1 pkg2_v1.PersistentVolumeClaim
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_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 = []pkg2_v1.PersistentVolumeClaim{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePetSet(v []PetSet, 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) decSlicePetSet(v *[]PetSet, 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 = []PetSet{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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([]PetSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PetSet, 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] = PetSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PetSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PetSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PetSet{}) // var yyz1 PetSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PetSet{}
+ } 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 = []PetSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.go
new file mode 100644
index 0000000..93a0c66
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types.go
@@ -0,0 +1,94 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// PetSet 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 PetSet guarantees that a given network identity will always
+// map to the same storage identity. PetSet is currently in alpha
+// and subject to change without notice.
+type PetSet struct {
+ unversioned.TypeMeta `json:",inline"`
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired identities of pets in this set.
+ Spec PetSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the current status of Pets in this PetSet. This data
+ // may be out of date by some window of time.
+ Status PetSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// A PetSetSpec is the specification of a PetSet.
+type PetSetSpec 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.
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *unversioned.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 PetSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the PetSet.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // VolumeClaimTemplates is a list of claims that pets are allowed to reference.
+ // The PetSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pet. 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.
+ VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
+
+ // ServiceName is the name of the service that governs this PetSet.
+ // This service must exist before the PetSet, and is responsible for
+ // the network identity of the set. Pets get DNS/hostnames that follow the
+ // pattern: pet-specific-string.serviceName.default.svc.cluster.local
+ // where "pet-specific-string" is managed by the PetSet controller.
+ ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
+}
+
+// PetSetStatus represents the current state of a PetSet.
+type PetSetStatus struct {
+ // most recent generation observed by this autoscaler.
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // Replicas is the number of actual replicas.
+ Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
+}
+
+// PetSetList is a collection of PetSets.
+type PetSetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []PetSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..5191f12
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,71 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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_PetSet = map[string]string{
+ "": "PetSet 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 PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.",
+ "spec": "Spec defines the desired identities of pets in this set.",
+ "status": "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.",
+}
+
+func (PetSet) SwaggerDoc() map[string]string {
+ return map_PetSet
+}
+
+var map_PetSetList = map[string]string{
+ "": "PetSetList is a collection of PetSets.",
+}
+
+func (PetSetList) SwaggerDoc() map[string]string {
+ return map_PetSetList
+}
+
+var map_PetSetSpec = map[string]string{
+ "": "A PetSetSpec is the specification of a PetSet.",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#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 PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.",
+ "volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. 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 PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.",
+}
+
+func (PetSetSpec) SwaggerDoc() map[string]string {
+ return map_PetSetSpec
+}
+
+var map_PetSetStatus = map[string]string{
+ "": "PetSetStatus represents the current state of a PetSet.",
+ "observedGeneration": "most recent generation observed by this autoscaler.",
+ "replicas": "Replicas is the number of actual replicas.",
+}
+
+func (PetSetStatus) SwaggerDoc() map[string]string {
+ return map_PetSetStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/deep_copy_generated.go
new file mode 100644
index 0000000..6424875
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/deep_copy_generated.go
@@ -0,0 +1,86 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_authenticationk8sio_TokenReview,
+ DeepCopy_authenticationk8sio_TokenReviewSpec,
+ DeepCopy_authenticationk8sio_TokenReviewStatus,
+ DeepCopy_authenticationk8sio_UserInfo,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_authenticationk8sio_TokenReview(in TokenReview, out *TokenReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Spec = in.Spec
+ if err := DeepCopy_authenticationk8sio_TokenReviewStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_authenticationk8sio_TokenReviewSpec(in TokenReviewSpec, out *TokenReviewSpec, c *conversion.Cloner) error {
+ out.Token = in.Token
+ return nil
+}
+
+func DeepCopy_authenticationk8sio_TokenReviewStatus(in TokenReviewStatus, out *TokenReviewStatus, c *conversion.Cloner) error {
+ out.Authenticated = in.Authenticated
+ if err := DeepCopy_authenticationk8sio_UserInfo(in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_authenticationk8sio_UserInfo(in UserInfo, out *UserInfo, c *conversion.Cloner) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Groups = nil
+ }
+ if in.Extra != nil {
+ in, out := in.Extra, &out.Extra
+ *out = make(map[string][]string)
+ for key, val := range in {
+ if newVal, err := c.DeepCopy(val); err != nil {
+ return err
+ } else {
+ (*out)[key] = newVal.([]string)
+ }
+ }
+ } else {
+ out.Extra = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/doc.go
new file mode 100644
index 0000000..66c5ae7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/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 authentication
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/install/install.go
new file mode 100644
index 0000000..e021ea8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/install/install.go
@@ -0,0 +1,123 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/authentication.k8s.io"
+ "k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/authentication.k8s.io"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", authentication.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ authentication.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1beta1.SchemeGroupVersion:
+ v1beta1.AddToScheme(api.Scheme)
+ }
+ }
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
+ rootScoped := sets.NewString("TokenReview")
+ ignoredKinds := sets.NewString()
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1beta1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(authentication.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/register.go
new file mode 100644
index 0000000..57394fc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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 = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+}
+
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+}
+
+func (obj *TokenReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.generated.go
new file mode 100644
index 0000000..b666e8c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.generated.go
@@ -0,0 +1,1265 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 authentication
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ "reflect"
+ "runtime"
+)
+
+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_unversioned.TypeMeta
+ _ = v0
+ }
+}
+
+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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "Spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = TokenReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "Status":
+ if r.TryDecodeAsNil() {
+ x.Status = TokenReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = TokenReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = TokenReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ 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.Token))
+ }
+ } else {
+ 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 {
+ x.Token = string(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 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.Token = ""
+ } else {
+ x.Token = string(r.DecodeString())
+ }
+ 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 *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 [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.EncodeBool(bool(x.Authenticated))
+ }
+ } else {
+ 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)
+ yy7 := &x.User
+ yy7.CodecEncodeSelf(e)
+ } else {
+ 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_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 {
+ x.Authenticated = bool(r.DecodeBool())
+ }
+ case "User":
+ if r.TryDecodeAsNil() {
+ x.User = UserInfo{}
+ } else {
+ yyv5 := &x.User
+ yyv5.CodecDecodeSelf(d)
+ }
+ 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 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.Authenticated = false
+ } else {
+ x.Authenticated = bool(r.DecodeBool())
+ }
+ 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.User = UserInfo{}
+ } else {
+ yyv8 := &x.User
+ 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 *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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } 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.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ 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)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ 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 x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ 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 x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encMapstringSlicestring((map[string][]string)(x.Extra), e)
+ }
+ }
+ } else {
+ 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.encMapstringSlicestring((map[string][]string)(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 {
+ x.Username = string(r.DecodeString())
+ }
+ case "UID":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = string(r.DecodeString())
+ }
+ case "Groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv6 := &x.Groups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "Extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv8 := &x.Extra
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(yyv8), 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 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.Username = ""
+ } else {
+ x.Username = string(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.UID = ""
+ } else {
+ x.UID = string(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.Groups = nil
+ } else {
+ yyv13 := &x.Groups
+ 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.Extra = nil
+ } else {
+ yyv15 := &x.Extra
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(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 codecSelfer1234) encMapstringSlicestring(v map[string][]string, 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 {
+ z.F.EncSliceStringV(yyv1, false, e)
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringSlicestring(v *map[string][]string, 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][]string, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 []string
+ 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv3, false, 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSlicestring(v []string, 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) decSlicestring(v *[]string, 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 {
+ yyv1[yyj1] = string(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = string(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 {
+ yyv1[yyj1] = string(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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.go
new file mode 100644
index 0000000..20eac2b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/types.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 authentication
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// TokenReview attempts to authenticate a token to a known user.
+type TokenReview struct {
+ unversioned.TypeMeta
+
+ // 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.
+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
+}
+
+// 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][]string
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion.go
new file mode 100644
index 0000000..e360ee8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion.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 v1beta1
+
+import (
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs()
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go
new file mode 100644
index 0000000..d60db5e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go
@@ -0,0 +1,143 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ authentication_k8s_io "k8s.io/kubernetes/pkg/apis/authentication.k8s.io"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_TokenReview_To_authenticationk8sio_TokenReview,
+ Convert_authenticationk8sio_TokenReview_To_v1beta1_TokenReview,
+ Convert_v1beta1_TokenReviewSpec_To_authenticationk8sio_TokenReviewSpec,
+ Convert_authenticationk8sio_TokenReviewSpec_To_v1beta1_TokenReviewSpec,
+ Convert_v1beta1_TokenReviewStatus_To_authenticationk8sio_TokenReviewStatus,
+ Convert_authenticationk8sio_TokenReviewStatus_To_v1beta1_TokenReviewStatus,
+ Convert_v1beta1_UserInfo_To_authenticationk8sio_UserInfo,
+ Convert_authenticationk8sio_UserInfo_To_v1beta1_UserInfo,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1beta1_TokenReview_To_authenticationk8sio_TokenReview(in *TokenReview, out *authentication_k8s_io.TokenReview, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_TokenReviewSpec_To_authenticationk8sio_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_TokenReviewStatus_To_authenticationk8sio_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_TokenReview_To_authenticationk8sio_TokenReview(in *TokenReview, out *authentication_k8s_io.TokenReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReview_To_authenticationk8sio_TokenReview(in, out, s)
+}
+
+func autoConvert_authenticationk8sio_TokenReview_To_v1beta1_TokenReview(in *authentication_k8s_io.TokenReview, out *TokenReview, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := Convert_authenticationk8sio_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authenticationk8sio_TokenReviewStatus_To_v1beta1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_authenticationk8sio_TokenReview_To_v1beta1_TokenReview(in *authentication_k8s_io.TokenReview, out *TokenReview, s conversion.Scope) error {
+ return autoConvert_authenticationk8sio_TokenReview_To_v1beta1_TokenReview(in, out, s)
+}
+
+func autoConvert_v1beta1_TokenReviewSpec_To_authenticationk8sio_TokenReviewSpec(in *TokenReviewSpec, out *authentication_k8s_io.TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+func Convert_v1beta1_TokenReviewSpec_To_authenticationk8sio_TokenReviewSpec(in *TokenReviewSpec, out *authentication_k8s_io.TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReviewSpec_To_authenticationk8sio_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_authenticationk8sio_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication_k8s_io.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+func Convert_authenticationk8sio_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication_k8s_io.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_authenticationk8sio_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_TokenReviewStatus_To_authenticationk8sio_TokenReviewStatus(in *TokenReviewStatus, out *authentication_k8s_io.TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_v1beta1_UserInfo_To_authenticationk8sio_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_TokenReviewStatus_To_authenticationk8sio_TokenReviewStatus(in *TokenReviewStatus, out *authentication_k8s_io.TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReviewStatus_To_authenticationk8sio_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_authenticationk8sio_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication_k8s_io.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_authenticationk8sio_UserInfo_To_v1beta1_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_authenticationk8sio_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication_k8s_io.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_authenticationk8sio_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_UserInfo_To_authenticationk8sio_UserInfo(in *UserInfo, out *authentication_k8s_io.UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = in.Groups
+ out.Extra = in.Extra
+ return nil
+}
+
+func Convert_v1beta1_UserInfo_To_authenticationk8sio_UserInfo(in *UserInfo, out *authentication_k8s_io.UserInfo, s conversion.Scope) error {
+ return autoConvert_v1beta1_UserInfo_To_authenticationk8sio_UserInfo(in, out, s)
+}
+
+func autoConvert_authenticationk8sio_UserInfo_To_v1beta1_UserInfo(in *authentication_k8s_io.UserInfo, out *UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = in.Groups
+ out.Extra = in.Extra
+ return nil
+}
+
+func Convert_authenticationk8sio_UserInfo_To_v1beta1_UserInfo(in *authentication_k8s_io.UserInfo, out *UserInfo, s conversion.Scope) error {
+ return autoConvert_authenticationk8sio_UserInfo_To_v1beta1_UserInfo(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go
new file mode 100644
index 0000000..d3294bf
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go
@@ -0,0 +1,86 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1beta1_TokenReview,
+ DeepCopy_v1beta1_TokenReviewSpec,
+ DeepCopy_v1beta1_TokenReviewStatus,
+ DeepCopy_v1beta1_UserInfo,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1beta1_TokenReview(in TokenReview, out *TokenReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Spec = in.Spec
+ if err := DeepCopy_v1beta1_TokenReviewStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_TokenReviewSpec(in TokenReviewSpec, out *TokenReviewSpec, c *conversion.Cloner) error {
+ out.Token = in.Token
+ return nil
+}
+
+func DeepCopy_v1beta1_TokenReviewStatus(in TokenReviewStatus, out *TokenReviewStatus, c *conversion.Cloner) error {
+ out.Authenticated = in.Authenticated
+ if err := DeepCopy_v1beta1_UserInfo(in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_UserInfo(in UserInfo, out *UserInfo, c *conversion.Cloner) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Groups = nil
+ }
+ if in.Extra != nil {
+ in, out := in.Extra, &out.Extra
+ *out = make(map[string][]string)
+ for key, val := range in {
+ if newVal, err := c.DeepCopy(val); err != nil {
+ return err
+ } else {
+ (*out)[key] = newVal.([]string)
+ }
+ }
+ } else {
+ out.Extra = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/defaults.go
new file mode 100644
index 0000000..83794ff
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/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/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/doc.go
new file mode 100644
index 0000000..25b76fd
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication.k8s.io
+
+package v1beta1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/register.go
new file mode 100644
index 0000000..5117936
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/register.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 v1beta1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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 = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+}
+
+func (obj *TokenReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go
new file mode 100644
index 0000000..60eeab9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go
@@ -0,0 +1,1321 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ "reflect"
+ "runtime"
+)
+
+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_unversioned.TypeMeta
+ _ = v0
+ }
+}
+
+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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = TokenReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = TokenReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = TokenReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = TokenReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Token = string(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 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.Token = ""
+ } else {
+ x.Token = string(r.DecodeString())
+ }
+ 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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Authenticated != false
+ 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] {
+ 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_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 {
+ x.Authenticated = bool(r.DecodeBool())
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = UserInfo{}
+ } else {
+ yyv5 := &x.User
+ yyv5.CodecDecodeSelf(d)
+ }
+ 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 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.Authenticated = false
+ } else {
+ x.Authenticated = bool(r.DecodeBool())
+ }
+ 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.User = UserInfo{}
+ } else {
+ yyv8 := &x.User
+ 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 *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.encMapstringSlicestring((map[string][]string)(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.encMapstringSlicestring((map[string][]string)(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 {
+ x.Username = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = string(r.DecodeString())
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv6 := &x.Groups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv8 := &x.Extra
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(yyv8), 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 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.Username = ""
+ } else {
+ x.Username = string(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.UID = ""
+ } else {
+ x.UID = string(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.Groups = nil
+ } else {
+ yyv13 := &x.Groups
+ 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.Extra = nil
+ } else {
+ yyv15 := &x.Extra
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(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 codecSelfer1234) encMapstringSlicestring(v map[string][]string, 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 {
+ z.F.EncSliceStringV(yyv1, false, e)
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringSlicestring(v *map[string][]string, 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][]string, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 []string
+ 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv3, false, 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSlicestring(v []string, 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) decSlicestring(v *[]string, 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 {
+ yyv1[yyj1] = string(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = string(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 {
+ yyv1[yyj1] = string(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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/types.go
new file mode 100644
index 0000000..ee32206
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1/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 v1beta1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec `json:"spec"`
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ Status TokenReviewStatus `json:"status,omitempty"`
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ Token string `json:"token,omitempty"`
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ Authenticated bool `json:"authenticated,omitempty"`
+ // User is the UserInfo associated with the provided token.
+ User UserInfo `json:"user,omitempty"`
+}
+
+// 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 `json:"username,omitempty"`
+ // 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 `json:"uid,omitempty"`
+ // The names of groups this user is a part of.
+ Groups []string `json:"groups,omitempty"`
+ // Any additional information provided by the authenticator.
+ Extra map[string][]string `json:"extra,omitempty"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/deep_copy_generated.go
new file mode 100644
index 0000000..5e92552
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/deep_copy_generated.go
@@ -0,0 +1,149 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_authorization_LocalSubjectAccessReview,
+ DeepCopy_authorization_NonResourceAttributes,
+ DeepCopy_authorization_ResourceAttributes,
+ DeepCopy_authorization_SelfSubjectAccessReview,
+ DeepCopy_authorization_SelfSubjectAccessReviewSpec,
+ DeepCopy_authorization_SubjectAccessReview,
+ DeepCopy_authorization_SubjectAccessReviewSpec,
+ DeepCopy_authorization_SubjectAccessReviewStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_authorization_LocalSubjectAccessReview(in LocalSubjectAccessReview, out *LocalSubjectAccessReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_authorization_SubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_authorization_NonResourceAttributes(in NonResourceAttributes, out *NonResourceAttributes, c *conversion.Cloner) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+func DeepCopy_authorization_ResourceAttributes(in ResourceAttributes, out *ResourceAttributes, c *conversion.Cloner) 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
+}
+
+func DeepCopy_authorization_SelfSubjectAccessReview(in SelfSubjectAccessReview, out *SelfSubjectAccessReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_authorization_SelfSubjectAccessReviewSpec(in SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, c *conversion.Cloner) error {
+ if in.ResourceAttributes != nil {
+ in, out := in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = *in
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = *in
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ return nil
+}
+
+func DeepCopy_authorization_SubjectAccessReview(in SubjectAccessReview, out *SubjectAccessReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_authorization_SubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_authorization_SubjectAccessReviewSpec(in SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, c *conversion.Cloner) error {
+ if in.ResourceAttributes != nil {
+ in, out := in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = *in
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = *in
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ out.User = in.User
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Groups = nil
+ }
+ if in.Extra != nil {
+ in, out := in.Extra, &out.Extra
+ *out = make(map[string][]string)
+ for key, val := range in {
+ if newVal, err := c.DeepCopy(val); err != nil {
+ return err
+ } else {
+ (*out)[key] = newVal.([]string)
+ }
+ }
+ } else {
+ out.Extra = nil
+ }
+ return nil
+}
+
+func DeepCopy_authorization_SubjectAccessReviewStatus(in SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, c *conversion.Cloner) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go
new file mode 100644
index 0000000..9660e5e
--- /dev/null
+++ b/src/kube2msb/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
+
+package authorization
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go
new file mode 100644
index 0000000..7899815
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.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 install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/authorization"
+ "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/authorization"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", authorization.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ authorization.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1beta1.SchemeGroupVersion:
+ v1beta1.AddToScheme(api.Scheme)
+ }
+ }
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
+ worstToBestGroupVersions := []unversioned.GroupVersion{}
+ for i := len(externalVersions) - 1; i >= 0; i-- {
+ worstToBestGroupVersions = append(worstToBestGroupVersions, externalVersions[i])
+ }
+
+ rootScoped := sets.NewString("SubjectAccessReview", "SelfSubjectAccessReview")
+ ignoredKinds := sets.NewString()
+ return api.NewDefaultRESTMapper(worstToBestGroupVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1beta1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(authorization.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go
new file mode 100644
index 0000000..b1cfa49
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/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 authorization
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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 = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+}
+
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.generated.go
new file mode 100644
index 0000000..a0811c8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.generated.go
@@ -0,0 +1,2570 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 authorization
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ "reflect"
+ "runtime"
+)
+
+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_unversioned.TypeMeta
+ _ = v0
+ }
+}
+
+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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "Spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "Status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "Spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "Status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "Spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "Status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 7
+ 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.Verb))
+ }
+ } else {
+ 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)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ 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)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ } else {
+ 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)
+ yym16 := z.EncBinary()
+ _ = yym16
+ 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)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ } else {
+ 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)
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ 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 {
+ x.Namespace = string(r.DecodeString())
+ }
+ case "Verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ x.Verb = string(r.DecodeString())
+ }
+ case "Group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ x.Group = string(r.DecodeString())
+ }
+ case "Version":
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ x.Version = string(r.DecodeString())
+ }
+ case "Resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ x.Resource = string(r.DecodeString())
+ }
+ case "Subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ x.Subresource = string(r.DecodeString())
+ }
+ case "Name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(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 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.Namespace = ""
+ } else {
+ x.Namespace = string(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.Verb = ""
+ } else {
+ x.Verb = string(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.Group = ""
+ } else {
+ x.Group = string(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.Version = ""
+ } else {
+ x.Version = string(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.Resource = ""
+ } else {
+ x.Resource = string(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.Subresource = ""
+ } else {
+ x.Subresource = string(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.Name = ""
+ } else {
+ x.Name = string(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 *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
+ 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.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)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ 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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "Verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ x.Verb = string(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 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 {
+ x.Path = string(r.DecodeString())
+ }
+ 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.Verb = ""
+ } else {
+ x.Verb = string(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 *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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 5
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ 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 x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ 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)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ 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 x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ 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 x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringSlicestring((map[string][]string)(x.Extra), e)
+ }
+ }
+ } else {
+ 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.encMapstringSlicestring((map[string][]string)(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 {
+ x.User = string(r.DecodeString())
+ }
+ case "Groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv7 := &x.Groups
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv7, false, d)
+ }
+ }
+ case "Extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv9 := &x.Extra
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(yyv9), 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 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.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.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.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.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.User = ""
+ } else {
+ x.User = string(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.Groups = nil
+ } else {
+ yyv15 := &x.Groups
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, 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() {
+ x.Extra = nil
+ } else {
+ yyv17 := &x.Extra
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(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 *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
+ 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)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ 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 x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ 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 [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.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)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ 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_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 {
+ x.Allowed = bool(r.DecodeBool())
+ }
+ case "Reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(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 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.Allowed = false
+ } else {
+ x.Allowed = bool(r.DecodeBool())
+ }
+ 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.Reason = ""
+ } else {
+ x.Reason = string(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 codecSelfer1234) encMapstringSlicestring(v map[string][]string, 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 {
+ z.F.EncSliceStringV(yyv1, false, e)
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringSlicestring(v *map[string][]string, 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][]string, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 []string
+ 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv3, false, 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSlicestring(v []string, 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) decSlicestring(v *[]string, 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 {
+ yyv1[yyj1] = string(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = string(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 {
+ yyv1[yyj1] = string(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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go
new file mode 100644
index 0000000..afa2c42
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go
@@ -0,0 +1,124 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+)
+
+// 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 {
+ unversioned.TypeMeta
+
+ // 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
+}
+
+// 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 {
+ unversioned.TypeMeta
+
+ // 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
+}
+
+// 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 {
+ unversioned.TypeMeta
+
+ // 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][]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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go
new file mode 100644
index 0000000..cd03e61
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go
@@ -0,0 +1,30 @@
+/*
+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/kubernetes/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs()
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion_generated.go
new file mode 100644
index 0000000..18d1138
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion_generated.go
@@ -0,0 +1,333 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ authorization "k8s.io/kubernetes/pkg/apis/authorization"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.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,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(authorization.ResourceAttributes)
+ if err := Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(authorization.NonResourceAttributes)
+ if err := Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ return nil
+}
+
+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 {
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ if err := Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ if err := Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(authorization.ResourceAttributes)
+ if err := Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(authorization.NonResourceAttributes)
+ if err := Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ out.User = in.User
+ out.Groups = in.Groups
+ out.Extra = in.Extra
+ return nil
+}
+
+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 {
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ if err := Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ if err := Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ out.User = in.User
+ out.Groups = in.Groups
+ out.Extra = in.Extra
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/deep_copy_generated.go
new file mode 100644
index 0000000..23d2edf
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/deep_copy_generated.go
@@ -0,0 +1,149 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1beta1_LocalSubjectAccessReview,
+ DeepCopy_v1beta1_NonResourceAttributes,
+ DeepCopy_v1beta1_ResourceAttributes,
+ DeepCopy_v1beta1_SelfSubjectAccessReview,
+ DeepCopy_v1beta1_SelfSubjectAccessReviewSpec,
+ DeepCopy_v1beta1_SubjectAccessReview,
+ DeepCopy_v1beta1_SubjectAccessReviewSpec,
+ DeepCopy_v1beta1_SubjectAccessReviewStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1beta1_LocalSubjectAccessReview(in LocalSubjectAccessReview, out *LocalSubjectAccessReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1beta1_NonResourceAttributes(in NonResourceAttributes, out *NonResourceAttributes, c *conversion.Cloner) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+func DeepCopy_v1beta1_ResourceAttributes(in ResourceAttributes, out *ResourceAttributes, c *conversion.Cloner) 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
+}
+
+func DeepCopy_v1beta1_SelfSubjectAccessReview(in SelfSubjectAccessReview, out *SelfSubjectAccessReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(in SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, c *conversion.Cloner) error {
+ if in.ResourceAttributes != nil {
+ in, out := in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = *in
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = *in
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_SubjectAccessReview(in SubjectAccessReview, out *SubjectAccessReview, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1beta1_SubjectAccessReviewSpec(in SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, c *conversion.Cloner) error {
+ if in.ResourceAttributes != nil {
+ in, out := in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = *in
+ } else {
+ out.ResourceAttributes = nil
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = *in
+ } else {
+ out.NonResourceAttributes = nil
+ }
+ out.User = in.User
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Groups = nil
+ }
+ if in.Extra != nil {
+ in, out := in.Extra, &out.Extra
+ *out = make(map[string][]string)
+ for key, val := range in {
+ if newVal, err := c.DeepCopy(val); err != nil {
+ return err
+ } else {
+ (*out)[key] = newVal.([]string)
+ }
+ }
+ } else {
+ out.Extra = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_SubjectAccessReviewStatus(in SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, c *conversion.Cloner) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go
new file mode 100644
index 0000000..f9dda99
--- /dev/null
+++ b/src/kube2msb/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/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go
new file mode 100644
index 0000000..a6f2c27
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
+
+package v1beta1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go
new file mode 100644
index 0000000..fe99bee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.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 v1beta1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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 = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+}
+
+func (obj *LocalSubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
+func (obj *SubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
+func (obj *SelfSubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go
new file mode 100644
index 0000000..0bd74a1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go
@@ -0,0 +1,2710 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ "reflect"
+ "runtime"
+)
+
+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_unversioned.TypeMeta
+ _ = v0
+ }
+}
+
+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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.Spec
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Spec
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Status
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Status
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv4 := &x.Spec
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv9 := &x.Spec
+ 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.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Namespace = string(r.DecodeString())
+ }
+ case "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ x.Verb = string(r.DecodeString())
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ x.Group = string(r.DecodeString())
+ }
+ case "version":
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ x.Version = string(r.DecodeString())
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ x.Resource = string(r.DecodeString())
+ }
+ case "subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ x.Subresource = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(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 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.Namespace = ""
+ } else {
+ x.Namespace = string(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.Verb = ""
+ } else {
+ x.Verb = string(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.Group = ""
+ } else {
+ x.Group = string(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.Version = ""
+ } else {
+ x.Version = string(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.Resource = ""
+ } else {
+ x.Resource = string(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.Subresource = ""
+ } else {
+ x.Subresource = string(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.Name = ""
+ } else {
+ x.Name = string(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 *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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ x.Verb = string(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 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 {
+ x.Path = string(r.DecodeString())
+ }
+ 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.Verb = ""
+ } else {
+ x.Verb = string(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 *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.encMapstringSlicestring((map[string][]string)(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.encMapstringSlicestring((map[string][]string)(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 {
+ x.User = string(r.DecodeString())
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv7 := &x.Groups
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv7, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv9 := &x.Extra
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(yyv9), 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 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.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.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.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.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.User = ""
+ } else {
+ x.User = string(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.Groups = nil
+ } else {
+ yyv15 := &x.Groups
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, 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() {
+ x.Extra = nil
+ } else {
+ yyv17 := &x.Extra
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decMapstringSlicestring((*map[string][]string)(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Reason != ""
+ 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.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_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 {
+ x.Allowed = bool(r.DecodeBool())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(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 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.Allowed = false
+ } else {
+ x.Allowed = bool(r.DecodeBool())
+ }
+ 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.Reason = ""
+ } else {
+ x.Reason = string(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 codecSelfer1234) encMapstringSlicestring(v map[string][]string, 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 {
+ z.F.EncSliceStringV(yyv1, false, e)
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringSlicestring(v *map[string][]string, 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][]string, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 []string
+ 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv3, false, 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 {
+ yymk1 = string(r.DecodeString())
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSlicestring(v []string, 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) decSlicestring(v *[]string, 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 {
+ yyv1[yyj1] = string(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = string(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 {
+ yyv1[yyj1] = string(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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go
new file mode 100644
index 0000000..70c1282
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go
@@ -0,0 +1,123 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+)
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+type SubjectAccessReview struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec `json:"spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus `json:"status,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ Spec SelfSubjectAccessReviewSpec `json:"spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus `json:"status,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // 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"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus `json:"status,omitempty"`
+}
+
+// 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 `json:"namespace,omitempty"`
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ Verb string `json:"verb,omitempty"`
+ // Group is the API Group of the Resource. "*" means all.
+ Group string `json:"group,omitempty"`
+ // Version is the API Version of the Resource. "*" means all.
+ Version string `json:"version,omitempty"`
+ // Resource is one of the existing resource types. "*" means all.
+ Resource string `json:"resource,omitempty"`
+ // Subresource is one of the existing resource types. "" means none.
+ Subresource string `json:"subresource,omitempty"`
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ Name string `json:"name,omitempty"`
+}
+
+// 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 `json:"path,omitempty"`
+ // Verb is the standard HTTP verb
+ Verb string `json:"verb,omitempty"`
+}
+
+// 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
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty"`
+ // NonResourceAttributes describes information for a non-resource access request
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty"`
+
+ // 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 `json:"user,omitempty"`
+ // Groups is the groups you're testing for.
+ Groups []string `json:"group,omitempty"`
+ // 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][]string `json:"extra,omitempty"`
+}
+
+// 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
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty"`
+ // NonResourceAttributes describes information for a non-resource access request
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty"`
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool `json:"allowed"`
+ // Reason is optional. It indicates why a request was allowed or denied.
+ Reason string `json:"reason,omitempty"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..dc93476
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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.",
+}
+
+func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/deep_copy_generated.go
new file mode 100644
index 0000000..1ddcc13
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/deep_copy_generated.go
@@ -0,0 +1,149 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_autoscaling_CrossVersionObjectReference,
+ DeepCopy_autoscaling_HorizontalPodAutoscaler,
+ DeepCopy_autoscaling_HorizontalPodAutoscalerList,
+ DeepCopy_autoscaling_HorizontalPodAutoscalerSpec,
+ DeepCopy_autoscaling_HorizontalPodAutoscalerStatus,
+ DeepCopy_autoscaling_Scale,
+ DeepCopy_autoscaling_ScaleSpec,
+ DeepCopy_autoscaling_ScaleStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_autoscaling_CrossVersionObjectReference(in CrossVersionObjectReference, out *CrossVersionObjectReference, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+func DeepCopy_autoscaling_HorizontalPodAutoscaler(in HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_autoscaling_HorizontalPodAutoscalerList(in HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_autoscaling_HorizontalPodAutoscaler(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(in HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, c *conversion.Cloner) error {
+ out.ScaleTargetRef = in.ScaleTargetRef
+ if in.MinReplicas != nil {
+ in, out := in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.MinReplicas = nil
+ }
+ out.MaxReplicas = in.MaxReplicas
+ if in.TargetCPUUtilizationPercentage != nil {
+ in, out := in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.TargetCPUUtilizationPercentage = nil
+ }
+ return nil
+}
+
+func DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(in HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, c *conversion.Cloner) error {
+ if in.ObservedGeneration != nil {
+ in, out := in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ObservedGeneration = nil
+ }
+ if in.LastScaleTime != nil {
+ in, out := in.LastScaleTime, &out.LastScaleTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.LastScaleTime = nil
+ }
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ if in.CurrentCPUUtilizationPercentage != nil {
+ in, out := in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.CurrentCPUUtilizationPercentage = nil
+ }
+ return nil
+}
+
+func DeepCopy_autoscaling_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Spec = in.Spec
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_autoscaling_ScaleSpec(in ScaleSpec, out *ScaleSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+func DeepCopy_autoscaling_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ out.Selector = in.Selector
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go
new file mode 100644
index 0000000..2c77018
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go
new file mode 100644
index 0000000..be236ff
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go
@@ -0,0 +1,129 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/autoscaling"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", autoscaling.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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()
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(autoscaling.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ autoscaling.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1.SchemeGroupVersion:
+ v1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go
new file mode 100644
index 0000000..ee0d3c7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Scale{},
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ &api.ListOptions{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.generated.go
new file mode 100644
index 0000000..ded7227
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.generated.go
@@ -0,0 +1,2659 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 autoscaling
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_api "k8s.io/kubernetes/pkg/api"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_types "k8s.io/kubernetes/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 pkg2_api.ObjectMeta
+ var v1 pkg1_unversioned.TypeMeta
+ var v2 pkg3_types.UID
+ var v3 time.Time
+ _, _, _, _ = v0, v1, v2, v3
+ }
+}
+
+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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ScaleSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ScaleStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Replicas = 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 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.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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 *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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = ""
+ } else {
+ x.Selector = string(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 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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.Selector = ""
+ } else {
+ x.Selector = string(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 *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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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.Kind = ""
+ } else {
+ x.Kind = string(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.Name = ""
+ } else {
+ x.Name = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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 {
+ x.MaxReplicas = 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)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ 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 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.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv11 := &x.ScaleTargetRef
+ 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() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = 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.MaxReplicas = 0
+ } else {
+ x.MaxReplicas = 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() {
+ if x.TargetCPUUtilizationPercentage != nil {
+ x.TargetCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.TargetCPUUtilizationPercentage == nil {
+ x.TargetCPUUtilizationPercentage = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.TargetCPUUtilizationPercentage)) = 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 *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_unversioned.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 {
+ x.CurrentReplicas = int32(r.DecodeInt(32))
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ x.DesiredReplicas = 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)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ 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 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.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_unversioned.Time)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, 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.CurrentReplicas = 0
+ } else {
+ x.CurrentReplicas = 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.DesiredReplicas = 0
+ } else {
+ x.DesiredReplicas = 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.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 344)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go
new file mode 100644
index 0000000..6accc9f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/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 autoscaling
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec ScaleSpec `json:"spec,omitempty"`
+
+ // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
+ Status ScaleStatus `json:"status,omitempty"`
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ Replicas int32 `json:"replicas,omitempty"`
+}
+
+// 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"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector string `json:"selector,omitempty"`
+}
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ 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"`
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ MinReplicas *int32 `json:"minReplicas,omitempty"`
+ // upper limit for the number of pods that can be set by the autoscaler. It cannot be smaller than MinReplicas.
+ MaxReplicas int32 `json:"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.
+ TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"`
+}
+
+// current status of a horizontal pod autoscaler
+type HorizontalPodAutoscalerStatus struct {
+ // most recent generation observed by this autoscaler.
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
+
+ // last time the HorizontalPodAutoscaler scaled the number of pods;
+ // used by the autoscaler to control how often the number of pods is changed.
+ LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty"`
+
+ // current number of replicas of pods managed by this autoscaler.
+ CurrentReplicas int32 `json:"currentReplicas"`
+
+ // desired number of replicas of pods managed by this autoscaler.
+ DesiredReplicas int32 `json:"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.
+ CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"`
+}
+
+// +genclient=true
+
+// configuration of a horizontal pod autoscaler.
+type HorizontalPodAutoscaler struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty"`
+
+ // current information about the autoscaler.
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty"`
+}
+
+// list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler `json:"items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion_generated.go
new file mode 100644
index 0000000..3d56992
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion_generated.go
@@ -0,0 +1,300 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.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_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_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,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+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
+}
+
+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
+}
+
+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 {
+ SetDefaults_HorizontalPodAutoscaler(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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 Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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 Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 = in.MinReplicas
+ out.MaxReplicas = in.MaxReplicas
+ out.TargetCPUUtilizationPercentage = in.TargetCPUUtilizationPercentage
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s)
+}
+
+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 = in.MinReplicas
+ out.MaxReplicas = in.MaxReplicas
+ out.TargetCPUUtilizationPercentage = in.TargetCPUUtilizationPercentage
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in, out, s)
+}
+
+func autoConvert_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
+ out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_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
+ out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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
+}
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/deep_copy_generated.go
new file mode 100644
index 0000000..af0245e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/deep_copy_generated.go
@@ -0,0 +1,150 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1_CrossVersionObjectReference,
+ DeepCopy_v1_HorizontalPodAutoscaler,
+ DeepCopy_v1_HorizontalPodAutoscalerList,
+ DeepCopy_v1_HorizontalPodAutoscalerSpec,
+ DeepCopy_v1_HorizontalPodAutoscalerStatus,
+ DeepCopy_v1_Scale,
+ DeepCopy_v1_ScaleSpec,
+ DeepCopy_v1_ScaleStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1_CrossVersionObjectReference(in CrossVersionObjectReference, out *CrossVersionObjectReference, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+func DeepCopy_v1_HorizontalPodAutoscaler(in HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1_HorizontalPodAutoscalerList(in HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_HorizontalPodAutoscaler(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_HorizontalPodAutoscalerSpec(in HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, c *conversion.Cloner) error {
+ out.ScaleTargetRef = in.ScaleTargetRef
+ if in.MinReplicas != nil {
+ in, out := in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.MinReplicas = nil
+ }
+ out.MaxReplicas = in.MaxReplicas
+ if in.TargetCPUUtilizationPercentage != nil {
+ in, out := in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.TargetCPUUtilizationPercentage = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_HorizontalPodAutoscalerStatus(in HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, c *conversion.Cloner) error {
+ if in.ObservedGeneration != nil {
+ in, out := in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ObservedGeneration = nil
+ }
+ if in.LastScaleTime != nil {
+ in, out := in.LastScaleTime, &out.LastScaleTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.LastScaleTime = nil
+ }
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ if in.CurrentCPUUtilizationPercentage != nil {
+ in, out := in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.CurrentCPUUtilizationPercentage = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Spec = in.Spec
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1_ScaleSpec(in ScaleSpec, out *ScaleSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+func DeepCopy_v1_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ out.Selector = in.Selector
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go
new file mode 100644
index 0000000..aacf552
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/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 v1
+
+import (
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_HorizontalPodAutoscaler,
+ )
+}
+
+func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
+ if obj.Spec.MinReplicas == nil {
+ minReplicas := int32(1)
+ obj.Spec.MinReplicas = &minReplicas
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go
new file mode 100644
index 0000000..be1c70f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
+
+package v1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go
new file mode 100644
index 0000000..f44b843
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go
@@ -0,0 +1,1612 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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
+ HorizontalPodAutoscalerList
+ HorizontalPodAutoscalerSpec
+ HorizontalPodAutoscalerStatus
+ Scale
+ ScaleSpec
+ ScaleStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
+func (m *CrossVersionObjectReference) String() string { return proto.CompactTextString(m) }
+func (*CrossVersionObjectReference) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
+func (m *HorizontalPodAutoscaler) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscaler) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
+func (m *HorizontalPodAutoscalerList) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscalerList) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
+func (m *HorizontalPodAutoscalerSpec) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
+func (m *HorizontalPodAutoscalerStatus) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (m *Scale) String() string { return proto.CompactTextString(m) }
+func (*Scale) ProtoMessage() {}
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (m *ScaleSpec) String() string { return proto.CompactTextString(m) }
+func (*ScaleSpec) ProtoMessage() {}
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (m *ScaleStatus) String() string { return proto.CompactTextString(m) }
+func (*ScaleStatus) ProtoMessage() {}
+
+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((*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((*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 *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()))
+ 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 *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()))
+ n5, err := m.ScaleTargetRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ 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()))
+ n6, err := m.LastScaleTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ 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 *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()))
+ 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.Spec.Size()))
+ n8, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n9, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ 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 *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 *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 (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 *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_kubernetes_pkg_api_unversioned.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 *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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
new file mode 100644
index 0000000..7730d6e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
@@ -0,0 +1,131 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ optional string kind = 1;
+
+ // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ optional string name = 2;
+
+ // API version of the referent
+ optional string apiVersion = 3;
+}
+
+// configuration of a horizontal pod autoscaler.
+message HorizontalPodAutoscaler {
+ // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ optional HorizontalPodAutoscalerSpec spec = 2;
+
+ // current information about the autoscaler.
+ optional HorizontalPodAutoscalerStatus status = 3;
+}
+
+// list of horizontal pod autoscaler objects.
+message HorizontalPodAutoscalerList {
+ // Standard list metadata.
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 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 int32 targetCPUUtilizationPercentage = 4;
+}
+
+// current status of a horizontal pod autoscaler
+message HorizontalPodAutoscalerStatus {
+ // most recent generation observed by this autoscaler.
+ 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 k8s.io.kubernetes.pkg.api.unversioned.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 int32 currentCPUUtilizationPercentage = 5;
+}
+
+// Scale represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
+ optional ScaleStatus status = 3;
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ 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://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional string selector = 2;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go
new file mode 100644
index 0000000..93d9535
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.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 v1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ &Scale{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go
new file mode 100644
index 0000000..ab9ebc5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go
@@ -0,0 +1,2659 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_types "k8s.io/kubernetes/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_unversioned.Time
+ var v1 pkg2_v1.ObjectMeta
+ var v2 pkg3_types.UID
+ var v3 time.Time
+ _, _, _, _ = v0, v1, v2, v3
+ }
+}
+
+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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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.Kind = ""
+ } else {
+ x.Kind = string(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.Name = ""
+ } else {
+ x.Name = string(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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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 {
+ x.MaxReplicas = 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)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ 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 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.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv11 := &x.ScaleTargetRef
+ 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() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = 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.MaxReplicas = 0
+ } else {
+ x.MaxReplicas = 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() {
+ if x.TargetCPUUtilizationPercentage != nil {
+ x.TargetCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.TargetCPUUtilizationPercentage == nil {
+ x.TargetCPUUtilizationPercentage = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.TargetCPUUtilizationPercentage)) = 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 *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_unversioned.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 {
+ x.CurrentReplicas = int32(r.DecodeInt(32))
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ x.DesiredReplicas = 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)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ 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 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.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_unversioned.Time)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, 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.CurrentReplicas = 0
+ } else {
+ x.CurrentReplicas = 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.DesiredReplicas = 0
+ } else {
+ x.DesiredReplicas = 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.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ScaleSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ScaleStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Replicas = 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 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.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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 *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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = ""
+ } else {
+ x.Selector = string(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 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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.Selector = ""
+ } else {
+ x.Selector = string(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 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, 344)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go
new file mode 100644
index 0000000..035288c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go
@@ -0,0 +1,122 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/unversioned"
+ "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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ 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.
+ 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.
+ 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.
+ 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.
+ LastScaleTime *unversioned.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.
+ CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
+}
+
+// +genclient=true
+
+// configuration of a horizontal pod autoscaler.
+type HorizontalPodAutoscaler struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current information about the autoscaler.
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
+ 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.
+ 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://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..6b9bcf4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"",
+ "name": "Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.",
+ "status": "current information about the autoscaler.",
+}
+
+func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscaler
+}
+
+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_Scale = map[string]string{
+ "": "Scale represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/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://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/deep_copy_generated.go
new file mode 100644
index 0000000..a6adac4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/deep_copy_generated.go
@@ -0,0 +1,258 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_batch_Job,
+ DeepCopy_batch_JobCondition,
+ DeepCopy_batch_JobList,
+ DeepCopy_batch_JobSpec,
+ DeepCopy_batch_JobStatus,
+ DeepCopy_batch_JobTemplate,
+ DeepCopy_batch_JobTemplateSpec,
+ DeepCopy_batch_ScheduledJob,
+ DeepCopy_batch_ScheduledJobList,
+ DeepCopy_batch_ScheduledJobSpec,
+ DeepCopy_batch_ScheduledJobStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_batch_Job(in Job, out *Job, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_batch_JobCondition(in JobCondition, out *JobCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_batch_JobList(in JobList, out *JobList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_batch_Job(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_batch_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
+ if in.Parallelism != nil {
+ in, out := in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Parallelism = nil
+ }
+ if in.Completions != nil {
+ in, out := in.Completions, &out.Completions
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Completions = nil
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ActiveDeadlineSeconds = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if in.ManualSelector != nil {
+ in, out := in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.ManualSelector = nil
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_batch_JobStatus(in JobStatus, out *JobStatus, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.StartTime != nil {
+ in, out := in.StartTime, &out.StartTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.StartTime = nil
+ }
+ if in.CompletionTime != nil {
+ in, out := in.CompletionTime, &out.CompletionTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.CompletionTime = nil
+ }
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func DeepCopy_batch_JobTemplate(in JobTemplate, out *JobTemplate, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_JobTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_batch_JobTemplateSpec(in JobTemplateSpec, out *JobTemplateSpec, c *conversion.Cloner) error {
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_JobSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_batch_ScheduledJob(in ScheduledJob, out *ScheduledJob, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_ScheduledJobSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_ScheduledJobStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_batch_ScheduledJobList(in ScheduledJobList, out *ScheduledJobList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]ScheduledJob, len(in))
+ for i := range in {
+ if err := DeepCopy_batch_ScheduledJob(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_batch_ScheduledJobSpec(in ScheduledJobSpec, out *ScheduledJobSpec, c *conversion.Cloner) error {
+ out.Schedule = in.Schedule
+ if in.StartingDeadlineSeconds != nil {
+ in, out := in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.StartingDeadlineSeconds = nil
+ }
+ out.ConcurrencyPolicy = in.ConcurrencyPolicy
+ if in.Suspend != nil {
+ in, out := in.Suspend, &out.Suspend
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.Suspend = nil
+ }
+ if err := DeepCopy_batch_JobTemplateSpec(in.JobTemplate, &out.JobTemplate, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_batch_ScheduledJobStatus(in ScheduledJobStatus, out *ScheduledJobStatus, c *conversion.Cloner) error {
+ if in.Active != nil {
+ in, out := in.Active, &out.Active
+ *out = make([]api.ObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Active = nil
+ }
+ if in.LastScheduleTime != nil {
+ in, out := in.LastScheduleTime, &out.LastScheduleTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.LastScheduleTime = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go
new file mode 100644
index 0000000..c6b203c
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go
new file mode 100644
index 0000000..22f92b7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go
@@ -0,0 +1,137 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/batch/v1"
+ "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/batch"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1.SchemeGroupVersion, v2alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", batch.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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()
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ case v2alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(batch.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ batch.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1.SchemeGroupVersion:
+ v1.AddToScheme(api.Scheme)
+ case v2alpha1.SchemeGroupVersion:
+ v2alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go
new file mode 100644
index 0000000..641df5f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go
@@ -0,0 +1,56 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ &JobTemplate{},
+ &ScheduledJob{},
+ &ScheduledJobList{},
+ &api.ListOptions{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.generated.go
new file mode 100644
index 0000000..03f0d24
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.generated.go
@@ -0,0 +1,4671 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 batch
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_api "k8s.io/kubernetes/pkg/api"
+ pkg4_resource "k8s.io/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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_api.ObjectMeta
+ var v1 pkg4_resource.Quantity
+ var v2 pkg1_unversioned.TypeMeta
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = JobSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = JobStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Template
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Template
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = JobTemplateSpec{}
+ } else {
+ yyv5 := &x.Template
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Template = JobTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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 = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv7 := &x.ObjectMeta
+ 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.Spec = JobSpec{}
+ } else {
+ yyv8 := &x.Spec
+ 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 *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_unversioned.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 = pkg2_api.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_unversioned.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 = pkg2_api.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_unversioned.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_unversioned.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 {
+ x.Active = int32(r.DecodeInt(32))
+ }
+ case "succeeded":
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ x.Succeeded = int32(r.DecodeInt(32))
+ }
+ case "failed":
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ x.Failed = 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 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.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(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.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_unversioned.Time)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, 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() {
+ if x.CompletionTime != nil {
+ x.CompletionTime = nil
+ }
+ } else {
+ if x.CompletionTime == nil {
+ x.CompletionTime = new(pkg1_unversioned.Time)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, 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.Active = 0
+ } else {
+ x.Active = 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.Succeeded = 0
+ } else {
+ x.Succeeded = 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.Failed = 0
+ } else {
+ x.Failed = 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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = pkg2_api.ConditionStatus(r.DecodeString())
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = pkg2_api.ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastProbeTime
+ 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.LastTransitionTime = pkg1_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ScheduledJobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScheduledJobStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScheduledJob) 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ScheduledJobSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ScheduledJobStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceScheduledJob(([]ScheduledJob)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceScheduledJob((*[]ScheduledJob)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScheduledJobList) 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceScheduledJob((*[]ScheduledJob)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.StartingDeadlineSeconds != nil
+ yyq2[2] = x.ConcurrencyPolicy != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } 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.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 x.Suspend == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Suspend
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ 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_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Schedule = string(r.DecodeString())
+ }
+ case "startingDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "concurrencyPolicy":
+ if r.TryDecodeAsNil() {
+ x.ConcurrencyPolicy = ""
+ } else {
+ x.ConcurrencyPolicy = ConcurrencyPolicy(r.DecodeString())
+ }
+ case "suspend":
+ if r.TryDecodeAsNil() {
+ if x.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ case "jobTemplate":
+ if r.TryDecodeAsNil() {
+ x.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv10 := &x.JobTemplate
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScheduledJobSpec) 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.Schedule = ""
+ } else {
+ x.Schedule = string(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.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.ConcurrencyPolicy = ""
+ } else {
+ x.ConcurrencyPolicy = ConcurrencyPolicy(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.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ 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.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv18 := &x.JobTemplate
+ 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 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 *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.encSliceapi_ObjectReference(([]pkg2_api.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.encSliceapi_ObjectReference(([]pkg2_api.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 *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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.decSliceapi_ObjectReference((*[]pkg2_api.ObjectReference)(yyv4), d)
+ }
+ }
+ case "lastScheduleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScheduleTime != nil {
+ x.LastScheduleTime = nil
+ }
+ } else {
+ if x.LastScheduleTime == nil {
+ x.LastScheduleTime = new(pkg1_unversioned.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 *ScheduledJobStatus) 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.decSliceapi_ObjectReference((*[]pkg2_api.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_unversioned.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) 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, 768)
+ 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
+ }
+}
+
+func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, 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) decSliceScheduledJob(v *[]ScheduledJob, 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 = []ScheduledJob{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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, 1000)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ScheduledJob, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ScheduledJob, 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] = ScheduledJob{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ScheduledJob{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ScheduledJob{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ScheduledJob{}) // var yyz1 ScheduledJob
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ScheduledJob{}
+ } 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 = []ScheduledJob{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceapi_ObjectReference(v []pkg2_api.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) decSliceapi_ObjectReference(v *[]pkg2_api.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 = []pkg2_api.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([]pkg2_api.ObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_api.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] = pkg2_api.ObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg2_api.ObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_api.ObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg2_api.ObjectReference{}) // var yyz1 pkg2_api.ObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_api.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 = []pkg2_api.ObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
new file mode 100644
index 0000000..61a35d4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
@@ -0,0 +1,244 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// +genclient=true
+
+// Job represents the configuration of a single job.
+type Job struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec JobSpec `json:"spec,omitempty"`
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status JobStatus `json:"status,omitempty"`
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is the list of Job.
+ Items []Job `json:"items"`
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+type JobTemplate struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Template defines jobs that will be created from this template
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Template JobTemplateSpec `json:"template,omitempty"`
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Specification of the desired behavior of the job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec JobSpec `json:"spec,omitempty"`
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // 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.
+ Parallelism *int32 `json:"parallelism,omitempty"`
+
+ // 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.
+ Completions *int32 `json:"completions,omitempty"`
+
+ // 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
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+
+ // 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.
+ ManualSelector *bool `json:"manualSelector,omitempty"`
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ Template api.PodTemplateSpec `json:"template"`
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+
+ // Conditions represent the latest available observations of an object's current state.
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ StartTime *unversioned.Time `json:"startTime,omitempty"`
+
+ // 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.
+ CompletionTime *unversioned.Time `json:"completionTime,omitempty"`
+
+ // Active is the number of actively running pods.
+ Active int32 `json:"active,omitempty"`
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ Succeeded int32 `json:"succeeded,omitempty"`
+
+ // Failed is the number of pods which reached Phase Failed.
+ Failed int32 `json:"failed,omitempty"`
+}
+
+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"`
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus `json:"status"`
+ // Last time the condition was checked.
+ LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
+ // Last time the condition transit from one status to another.
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
+ // (brief) reason for the condition's last transition.
+ Reason string `json:"reason,omitempty"`
+ // Human readable message indicating details about last transition.
+ Message string `json:"message,omitempty"`
+}
+
+// +genclient=true
+
+// ScheduledJob represents the configuration of a single scheduled job.
+type ScheduledJob struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec is a structure defining the expected behavior of a job, including the schedule.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec ScheduledJobSpec `json:"spec,omitempty"`
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status ScheduledJobStatus `json:"status,omitempty"`
+}
+
+// ScheduledJobList is a collection of scheduled jobs.
+type ScheduledJobList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is the list of ScheduledJob.
+ Items []ScheduledJob `json:"items"`
+}
+
+// ScheduledJobSpec describes how the job execution will look like and when it will actually run.
+type ScheduledJobSpec struct {
+
+ // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ Schedule string `json:"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.
+ StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
+
+ // ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
+ ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
+
+ // Suspend flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ Suspend *bool `json:"suspend"`
+
+ // JobTemplate is the object that describes the job that will be created when
+ // executing a ScheduledJob.
+ JobTemplate JobTemplateSpec `json:"jobTemplate"`
+}
+
+// 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 ScheduledJobs 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"
+)
+
+// ScheduledJobStatus represents the current state of a Job.
+type ScheduledJobStatus struct {
+ // Active holds pointers to currently running jobs.
+ Active []api.ObjectReference `json:"active,omitempty"`
+
+ // LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
+ LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go
new file mode 100644
index 0000000..8846af1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.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 (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_batch_JobSpec_To_v1_JobSpec,
+ Convert_v1_JobSpec_To_batch_JobSpec,
+ )
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+
+ err = api.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 not supported: %s", label)
+ }
+ })
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+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
+ // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1.LabelSelector
+ if in.Selector != nil {
+ out.Selector = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ // unable to generate simple pointer conversion for v1.LabelSelector -> unversioned.LabelSelector
+ if in.Selector != nil {
+ out.Selector = new(unversioned.LabelSelector)
+ if err := Convert_v1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion_generated.go
new file mode 100644
index 0000000..88e6d96
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion_generated.go
@@ -0,0 +1,330 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ batch "k8s.io/kubernetes/pkg/apis/batch"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.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,
+ Convert_v1_LabelSelector_To_unversioned_LabelSelector,
+ Convert_unversioned_LabelSelector_To_v1_LabelSelector,
+ Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
+ Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ SetDefaults_Job(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := Convert_v1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.ManualSelector = 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 = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.ManualSelector = 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 {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]batch.JobCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.StartTime = in.StartTime
+ out.CompletionTime = in.CompletionTime
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+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 {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := Convert_batch_JobCondition_To_v1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.StartTime = in.StartTime
+ out.CompletionTime = in.CompletionTime
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+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)
+}
+
+func autoConvert_v1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
+ out.MatchLabels = in.MatchLabels
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]unversioned.LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func Convert_v1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
+ return autoConvert_v1_LabelSelector_To_unversioned_LabelSelector(in, out, s)
+}
+
+func autoConvert_unversioned_LabelSelector_To_v1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error {
+ out.MatchLabels = in.MatchLabels
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func Convert_unversioned_LabelSelector_To_v1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error {
+ return autoConvert_unversioned_LabelSelector_To_v1_LabelSelector(in, out, s)
+}
+
+func autoConvert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = unversioned.LabelSelectorOperator(in.Operator)
+ out.Values = in.Values
+ return nil
+}
+
+func Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in, out, s)
+}
+
+func autoConvert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = LabelSelectorOperator(in.Operator)
+ out.Values = in.Values
+ return nil
+}
+
+func Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/deep_copy_generated.go
new file mode 100644
index 0000000..53d4eab
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/deep_copy_generated.go
@@ -0,0 +1,197 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1_Job,
+ DeepCopy_v1_JobCondition,
+ DeepCopy_v1_JobList,
+ DeepCopy_v1_JobSpec,
+ DeepCopy_v1_JobStatus,
+ DeepCopy_v1_LabelSelector,
+ DeepCopy_v1_LabelSelectorRequirement,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1_Job(in Job, out *Job, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1_JobCondition(in JobCondition, out *JobCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_v1_JobList(in JobList, out *JobList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1_Job(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
+ if in.Parallelism != nil {
+ in, out := in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Parallelism = nil
+ }
+ if in.Completions != nil {
+ in, out := in.Completions, &out.Completions
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Completions = nil
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ActiveDeadlineSeconds = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if in.ManualSelector != nil {
+ in, out := in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.ManualSelector = nil
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1_JobStatus(in JobStatus, out *JobStatus, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.StartTime != nil {
+ in, out := in.StartTime, &out.StartTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.StartTime = nil
+ }
+ if in.CompletionTime != nil {
+ in, out := in.CompletionTime, &out.CompletionTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.CompletionTime = nil
+ }
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func DeepCopy_v1_LabelSelector(in LabelSelector, out *LabelSelector, c *conversion.Cloner) error {
+ if in.MatchLabels != nil {
+ in, out := in.MatchLabels, &out.MatchLabels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.MatchLabels = nil
+ }
+ if in.MatchExpressions != nil {
+ in, out := in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(in))
+ for i := range in {
+ if err := DeepCopy_v1_LabelSelectorRequirement(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1_LabelSelectorRequirement(in LabelSelectorRequirement, out *LabelSelectorRequirement, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ if in.Values != nil {
+ in, out := in.Values, &out.Values
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Values = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go
new file mode 100644
index 0000000..571d2c5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.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 v1
+
+import (
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_Job,
+ )
+}
+
+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
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go
new file mode 100644
index 0000000..5695b9e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
+
+package v1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go
new file mode 100644
index 0000000..d3649ef
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go
@@ -0,0 +1,1901 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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
+ LabelSelector
+ LabelSelectorRequirement
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *Job) Reset() { *m = Job{} }
+func (m *Job) String() string { return proto.CompactTextString(m) }
+func (*Job) ProtoMessage() {}
+
+func (m *JobCondition) Reset() { *m = JobCondition{} }
+func (m *JobCondition) String() string { return proto.CompactTextString(m) }
+func (*JobCondition) ProtoMessage() {}
+
+func (m *JobList) Reset() { *m = JobList{} }
+func (m *JobList) String() string { return proto.CompactTextString(m) }
+func (*JobList) ProtoMessage() {}
+
+func (m *JobSpec) Reset() { *m = JobSpec{} }
+func (m *JobSpec) String() string { return proto.CompactTextString(m) }
+func (*JobSpec) ProtoMessage() {}
+
+func (m *JobStatus) Reset() { *m = JobStatus{} }
+func (m *JobStatus) String() string { return proto.CompactTextString(m) }
+func (*JobStatus) ProtoMessage() {}
+
+func (m *LabelSelector) Reset() { *m = LabelSelector{} }
+func (m *LabelSelector) String() string { return proto.CompactTextString(m) }
+func (*LabelSelector) ProtoMessage() {}
+
+func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
+func (m *LabelSelectorRequirement) String() string { return proto.CompactTextString(m) }
+func (*LabelSelectorRequirement) ProtoMessage() {}
+
+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")
+ proto.RegisterType((*LabelSelector)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.LabelSelector")
+ proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.LabelSelectorRequirement")
+}
+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 (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 {
+ for k := range m.MatchLabels {
+ data[i] = 0xa
+ i++
+ v := m.MatchLabels[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 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 (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 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 *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 = &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_kubernetes_pkg_api_unversioned.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_kubernetes_pkg_api_unversioned.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 (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
+ 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
+ if m.MatchLabels == nil {
+ m.MatchLabels = make(map[string]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 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
new file mode 100644
index 0000000..75840ed
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
@@ -0,0 +1,177 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional JobSpec spec = 2;
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
+
+ // Last time the condition transit from one status to another.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ optional string message = 6;
+}
+
+// JobList is a collection of jobs.
+message JobList {
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of Job.
+ repeated Job items = 2;
+}
+
+// JobSpec describes how the job execution will look like.
+message JobSpec {
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ optional int32 parallelism = 1;
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ 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 int64 activeDeadlineSeconds = 3;
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional 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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
+ optional bool manualSelector = 5;
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6;
+}
+
+// JobStatus represents the current state of a Job.
+message JobStatus {
+ // Conditions represent the latest available observations of an object's current state.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ repeated JobCondition conditions = 1;
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // 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 k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2;
+
+ // 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.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3;
+
+ // Active is the number of actively running pods.
+ optional int32 active = 4;
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ optional int32 succeeded = 5;
+
+ // Failed is the number of pods which reached Phase Failed.
+ optional int32 failed = 6;
+}
+
+// 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.
+ map<string, string> matchLabels = 1;
+
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ 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.
+ 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.
+ repeated string values = 3;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go
new file mode 100644
index 0000000..3631c02
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.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 v1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go
new file mode 100644
index 0000000..a44952c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go
@@ -0,0 +1,3184 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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 pkg4_resource.Quantity
+ var v1 pkg1_unversioned.TypeMeta
+ var v2 pkg2_v1.ObjectMeta
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = JobSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = JobStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ } 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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ 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(LabelSelector)
+ }
+ x.Selector.CodecDecodeSelf(d)
+ }
+ case "manualSelector":
+ if r.TryDecodeAsNil() {
+ if x.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = r.DecodeBool()
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv13 := &x.Template
+ yyv13.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 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.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = 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.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = 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.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.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.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = 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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.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 *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_unversioned.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_unversioned.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 {
+ x.Active = int32(r.DecodeInt(32))
+ }
+ case "succeeded":
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ x.Succeeded = int32(r.DecodeInt(32))
+ }
+ case "failed":
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ x.Failed = 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 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.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(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.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_unversioned.Time)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, 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() {
+ if x.CompletionTime != nil {
+ x.CompletionTime = nil
+ }
+ } else {
+ if x.CompletionTime == nil {
+ x.CompletionTime = new(pkg1_unversioned.Time)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, 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.Active = 0
+ } else {
+ x.Active = 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.Succeeded = 0
+ } else {
+ x.Succeeded = 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.Failed = 0
+ } else {
+ x.Failed = 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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = pkg2_v1.ConditionStatus(r.DecodeString())
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = pkg2_v1.ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastProbeTime
+ 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.LastTransitionTime = pkg1_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 *LabelSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.MatchLabels) != 0
+ yyq2[1] = len(x.MatchExpressions) != 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.MatchLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.MatchLabels, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchLabels"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.MatchLabels, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchExpressions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LabelSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LabelSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "matchLabels":
+ if r.TryDecodeAsNil() {
+ x.MatchLabels = nil
+ } else {
+ yyv4 := &x.MatchLabels
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv4, false, d)
+ }
+ }
+ case "matchExpressions":
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv6 := &x.MatchExpressions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LabelSelector) 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.MatchLabels = nil
+ } else {
+ yyv9 := &x.MatchLabels
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecMapStringStringX(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.MatchExpressions = nil
+ } else {
+ yyv11 := &x.MatchExpressions
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(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 *LabelSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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 *LabelSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LabelSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = LabelSelectorOperator(r.DecodeString())
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv6 := &x.Values
+ 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 *LabelSelectorRequirement) 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = LabelSelectorOperator(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.Values = nil
+ } else {
+ yyv11 := &x.Values
+ 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 LabelSelectorOperator) 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 *LabelSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var 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) 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, 792)
+ 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
+ }
+}
+
+func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequirement, 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) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequirement, 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 = []LabelSelectorRequirement{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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([]LabelSelectorRequirement, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LabelSelectorRequirement, 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] = LabelSelectorRequirement{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LabelSelectorRequirement{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LabelSelectorRequirement{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LabelSelectorRequirement{}) // var yyz1 LabelSelectorRequirement
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LabelSelectorRequirement{}
+ } 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 = []LabelSelectorRequirement{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go
new file mode 100644
index 0000000..a821e93
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go
@@ -0,0 +1,186 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// +genclient=true
+
+// Job represents the configuration of a single job.
+type Job struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Job.
+ Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ 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
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
+ ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+
+ // Conditions represent the latest available observations of an object's current state.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
+
+ // 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.
+ CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
+
+ // Active is the number of actively running pods.
+ Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
+
+ // Failed is the number of pods which reached Phase Failed.
+ 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.
+ LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transit from one status to another.
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+// 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.
+ 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.
+ 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.
+ 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.
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..aa0dbcc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go
@@ -0,0 +1,114 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is the list of Job.",
+}
+
+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": "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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "completions": "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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "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": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md",
+ "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+}
+
+func (JobSpec) SwaggerDoc() map[string]string {
+ return map_JobSpec
+}
+
+var map_JobStatus = map[string]string{
+ "": "JobStatus represents the current state of a Job.",
+ "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "startTime": "StartTime represents time when the job was acknowledged by the Job Manager. 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": "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": "Active is the number of actively running pods.",
+ "succeeded": "Succeeded is the number of pods which reached Phase Succeeded.",
+ "failed": "Failed is the number of pods which reached Phase Failed.",
+}
+
+func (JobStatus) SwaggerDoc() map[string]string {
+ return map_JobStatus
+}
+
+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
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go
new file mode 100644
index 0000000..2d5710a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go
@@ -0,0 +1,116 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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"
+ "reflect"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_batch_JobSpec_To_v2alpha1_JobSpec,
+ Convert_v2alpha1_JobSpec_To_batch_JobSpec,
+ )
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, kind := range []string{"Job", "JobTemplate", "ScheduledJob"} {
+ err = api.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 not supported: %s", label)
+ }
+ })
+ }
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func Convert_batch_JobSpec_To_v2alpha1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
+ defaulting.(func(*batch.JobSpec))(in)
+ }
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1.LabelSelector
+ if in.Selector != nil {
+ out.Selector = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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_v2alpha1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error {
+ if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
+ defaulting.(func(*JobSpec))(in)
+ }
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1.LabelSelector
+ if in.Selector != nil {
+ out.Selector = new(unversioned.LabelSelector)
+ if err := Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion_generated.go
new file mode 100644
index 0000000..3265269
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion_generated.go
@@ -0,0 +1,573 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ batch "k8s.io/kubernetes/pkg/apis/batch"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v2alpha1_Job_To_batch_Job,
+ Convert_batch_Job_To_v2alpha1_Job,
+ Convert_v2alpha1_JobCondition_To_batch_JobCondition,
+ Convert_batch_JobCondition_To_v2alpha1_JobCondition,
+ Convert_v2alpha1_JobList_To_batch_JobList,
+ Convert_batch_JobList_To_v2alpha1_JobList,
+ Convert_v2alpha1_JobSpec_To_batch_JobSpec,
+ Convert_batch_JobSpec_To_v2alpha1_JobSpec,
+ Convert_v2alpha1_JobStatus_To_batch_JobStatus,
+ Convert_batch_JobStatus_To_v2alpha1_JobStatus,
+ Convert_v2alpha1_JobTemplate_To_batch_JobTemplate,
+ Convert_batch_JobTemplate_To_v2alpha1_JobTemplate,
+ Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec,
+ Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec,
+ Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector,
+ Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector,
+ Convert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
+ Convert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement,
+ Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob,
+ Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob,
+ Convert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList,
+ Convert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList,
+ Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec,
+ Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec,
+ Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus,
+ Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ SetDefaults_Job(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ return autoConvert_v2alpha1_Job_To_batch_Job(in, out, s)
+}
+
+func autoConvert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobStatus_To_v2alpha1_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ return autoConvert_batch_Job_To_v2alpha1_Job(in, out, s)
+}
+
+func autoConvert_v2alpha1_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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func Convert_v2alpha1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobCondition_To_batch_JobCondition(in, out, s)
+}
+
+func autoConvert_batch_JobCondition_To_v2alpha1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ out.Type = JobConditionType(in.Type)
+ out.Status = v1.ConditionStatus(in.Status)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func Convert_batch_JobCondition_To_v2alpha1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ return autoConvert_batch_JobCondition_To_v2alpha1_JobCondition(in, out, s)
+}
+
+func autoConvert_v2alpha1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.Job, len(*in))
+ for i := range *in {
+ if err := Convert_v2alpha1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v2alpha1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobList_To_batch_JobList(in, out, s)
+}
+
+func autoConvert_batch_JobList_To_v2alpha1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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_v2alpha1_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_batch_JobList_To_v2alpha1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ return autoConvert_batch_JobList_To_v2alpha1_JobList(in, out, s)
+}
+
+func autoConvert_v2alpha1_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
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.ManualSelector = in.ManualSelector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_batch_JobSpec_To_v2alpha1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.ManualSelector = in.ManualSelector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v2alpha1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]batch.JobCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v2alpha1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.StartTime = in.StartTime
+ out.CompletionTime = in.CompletionTime
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func Convert_v2alpha1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobStatus_To_batch_JobStatus(in, out, s)
+}
+
+func autoConvert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := Convert_batch_JobCondition_To_v2alpha1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.StartTime = in.StartTime
+ out.CompletionTime = in.CompletionTime
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func Convert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ return autoConvert_batch_JobStatus_To_v2alpha1_JobStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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)
+}
+
+func autoConvert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
+ out.MatchLabels = in.MatchLabels
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]unversioned.LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
+ return autoConvert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in, out, s)
+}
+
+func autoConvert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error {
+ out.MatchLabels = in.MatchLabels
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error {
+ return autoConvert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in, out, s)
+}
+
+func autoConvert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = unversioned.LabelSelectorOperator(in.Operator)
+ out.Values = in.Values
+ return nil
+}
+
+func Convert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in, out, s)
+}
+
+func autoConvert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = LabelSelectorOperator(in.Operator)
+ out.Values = in.Values
+ return nil
+}
+
+func Convert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(in, out, s)
+}
+
+func autoConvert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in *ScheduledJob, out *batch.ScheduledJob, s conversion.Scope) error {
+ SetDefaults_ScheduledJob(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in *ScheduledJob, out *batch.ScheduledJob, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in, out, s)
+}
+
+func autoConvert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in *batch.ScheduledJob, out *ScheduledJob, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in *batch.ScheduledJob, out *ScheduledJob, s conversion.Scope) error {
+ return autoConvert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in, out, s)
+}
+
+func autoConvert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in *ScheduledJobList, out *batch.ScheduledJobList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.ScheduledJob, len(*in))
+ for i := range *in {
+ if err := Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in *ScheduledJobList, out *batch.ScheduledJobList, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in, out, s)
+}
+
+func autoConvert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in *batch.ScheduledJobList, out *ScheduledJobList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ScheduledJob, len(*in))
+ for i := range *in {
+ if err := Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in *batch.ScheduledJobList, out *ScheduledJobList, s conversion.Scope) error {
+ return autoConvert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in, out, s)
+}
+
+func autoConvert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in *ScheduledJobSpec, out *batch.ScheduledJobSpec, s conversion.Scope) error {
+ out.Schedule = in.Schedule
+ out.StartingDeadlineSeconds = in.StartingDeadlineSeconds
+ out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy)
+ out.Suspend = in.Suspend
+ if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in *ScheduledJobSpec, out *batch.ScheduledJobSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in, out, s)
+}
+
+func autoConvert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in *batch.ScheduledJobSpec, out *ScheduledJobSpec, s conversion.Scope) error {
+ out.Schedule = in.Schedule
+ out.StartingDeadlineSeconds = in.StartingDeadlineSeconds
+ out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy)
+ out.Suspend = in.Suspend
+ if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in *batch.ScheduledJobSpec, out *ScheduledJobSpec, s conversion.Scope) error {
+ return autoConvert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error {
+ if in.Active != nil {
+ in, out := &in.Active, &out.Active
+ *out = make([]api.ObjectReference, 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.Active = nil
+ }
+ out.LastScheduleTime = in.LastScheduleTime
+ return nil
+}
+
+func Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in, out, s)
+}
+
+func autoConvert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in *batch.ScheduledJobStatus, out *ScheduledJobStatus, s conversion.Scope) error {
+ if in.Active != nil {
+ in, out := &in.Active, &out.Active
+ *out = make([]v1.ObjectReference, 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.Active = nil
+ }
+ out.LastScheduleTime = in.LastScheduleTime
+ return nil
+}
+
+func Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in *batch.ScheduledJobStatus, out *ScheduledJobStatus, s conversion.Scope) error {
+ return autoConvert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..baa1b59
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/deep_copy_generated.go
@@ -0,0 +1,298 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v2alpha1_Job,
+ DeepCopy_v2alpha1_JobCondition,
+ DeepCopy_v2alpha1_JobList,
+ DeepCopy_v2alpha1_JobSpec,
+ DeepCopy_v2alpha1_JobStatus,
+ DeepCopy_v2alpha1_JobTemplate,
+ DeepCopy_v2alpha1_JobTemplateSpec,
+ DeepCopy_v2alpha1_LabelSelector,
+ DeepCopy_v2alpha1_LabelSelectorRequirement,
+ DeepCopy_v2alpha1_ScheduledJob,
+ DeepCopy_v2alpha1_ScheduledJobList,
+ DeepCopy_v2alpha1_ScheduledJobSpec,
+ DeepCopy_v2alpha1_ScheduledJobStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v2alpha1_Job(in Job, out *Job, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_JobSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_JobStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_JobCondition(in JobCondition, out *JobCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_v2alpha1_JobList(in JobList, out *JobList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v2alpha1_Job(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
+ if in.Parallelism != nil {
+ in, out := in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Parallelism = nil
+ }
+ if in.Completions != nil {
+ in, out := in.Completions, &out.Completions
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Completions = nil
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ActiveDeadlineSeconds = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v2alpha1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if in.ManualSelector != nil {
+ in, out := in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.ManualSelector = nil
+ }
+ if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_JobStatus(in JobStatus, out *JobStatus, c *conversion.Cloner) error {
+ if in.Conditions != nil {
+ in, out := in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(in))
+ for i := range in {
+ if err := DeepCopy_v2alpha1_JobCondition(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.StartTime != nil {
+ in, out := in.StartTime, &out.StartTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.StartTime = nil
+ }
+ if in.CompletionTime != nil {
+ in, out := in.CompletionTime, &out.CompletionTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.CompletionTime = nil
+ }
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func DeepCopy_v2alpha1_JobTemplate(in JobTemplate, out *JobTemplate, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_JobTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_JobTemplateSpec(in JobTemplateSpec, out *JobTemplateSpec, c *conversion.Cloner) error {
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_JobSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_LabelSelector(in LabelSelector, out *LabelSelector, c *conversion.Cloner) error {
+ if in.MatchLabels != nil {
+ in, out := in.MatchLabels, &out.MatchLabels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.MatchLabels = nil
+ }
+ if in.MatchExpressions != nil {
+ in, out := in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(in))
+ for i := range in {
+ if err := DeepCopy_v2alpha1_LabelSelectorRequirement(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_LabelSelectorRequirement(in LabelSelectorRequirement, out *LabelSelectorRequirement, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ if in.Values != nil {
+ in, out := in.Values, &out.Values
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Values = nil
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_ScheduledJob(in ScheduledJob, out *ScheduledJob, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_ScheduledJobSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_ScheduledJobStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_ScheduledJobList(in ScheduledJobList, out *ScheduledJobList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]ScheduledJob, len(in))
+ for i := range in {
+ if err := DeepCopy_v2alpha1_ScheduledJob(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_ScheduledJobSpec(in ScheduledJobSpec, out *ScheduledJobSpec, c *conversion.Cloner) error {
+ out.Schedule = in.Schedule
+ if in.StartingDeadlineSeconds != nil {
+ in, out := in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.StartingDeadlineSeconds = nil
+ }
+ out.ConcurrencyPolicy = in.ConcurrencyPolicy
+ if in.Suspend != nil {
+ in, out := in.Suspend, &out.Suspend
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.Suspend = nil
+ }
+ if err := DeepCopy_v2alpha1_JobTemplateSpec(in.JobTemplate, &out.JobTemplate, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v2alpha1_ScheduledJobStatus(in ScheduledJobStatus, out *ScheduledJobStatus, c *conversion.Cloner) error {
+ if in.Active != nil {
+ in, out := in.Active, &out.Active
+ *out = make([]v1.ObjectReference, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Active = nil
+ }
+ if in.LastScheduleTime != nil {
+ in, out := in.LastScheduleTime, &out.LastScheduleTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.LastScheduleTime = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go
new file mode 100644
index 0000000..a7d24ce
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.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 v2alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_Job,
+ SetDefaults_ScheduledJob,
+ )
+}
+
+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
+ }
+}
+
+func SetDefaults_ScheduledJob(obj *ScheduledJob) {
+ if obj.Spec.ConcurrencyPolicy == "" {
+ obj.Spec.ConcurrencyPolicy = AllowConcurrent
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go
new file mode 100644
index 0000000..76b5d32
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
+
+package v2alpha1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go
new file mode 100644
index 0000000..a461a47
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go
@@ -0,0 +1,3018 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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:
+ Job
+ JobCondition
+ JobList
+ JobSpec
+ JobStatus
+ JobTemplate
+ JobTemplateSpec
+ LabelSelector
+ LabelSelectorRequirement
+ ScheduledJob
+ ScheduledJobList
+ ScheduledJobSpec
+ ScheduledJobStatus
+*/
+package v2alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *Job) Reset() { *m = Job{} }
+func (m *Job) String() string { return proto.CompactTextString(m) }
+func (*Job) ProtoMessage() {}
+
+func (m *JobCondition) Reset() { *m = JobCondition{} }
+func (m *JobCondition) String() string { return proto.CompactTextString(m) }
+func (*JobCondition) ProtoMessage() {}
+
+func (m *JobList) Reset() { *m = JobList{} }
+func (m *JobList) String() string { return proto.CompactTextString(m) }
+func (*JobList) ProtoMessage() {}
+
+func (m *JobSpec) Reset() { *m = JobSpec{} }
+func (m *JobSpec) String() string { return proto.CompactTextString(m) }
+func (*JobSpec) ProtoMessage() {}
+
+func (m *JobStatus) Reset() { *m = JobStatus{} }
+func (m *JobStatus) String() string { return proto.CompactTextString(m) }
+func (*JobStatus) ProtoMessage() {}
+
+func (m *JobTemplate) Reset() { *m = JobTemplate{} }
+func (m *JobTemplate) String() string { return proto.CompactTextString(m) }
+func (*JobTemplate) ProtoMessage() {}
+
+func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} }
+func (m *JobTemplateSpec) String() string { return proto.CompactTextString(m) }
+func (*JobTemplateSpec) ProtoMessage() {}
+
+func (m *LabelSelector) Reset() { *m = LabelSelector{} }
+func (m *LabelSelector) String() string { return proto.CompactTextString(m) }
+func (*LabelSelector) ProtoMessage() {}
+
+func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
+func (m *LabelSelectorRequirement) String() string { return proto.CompactTextString(m) }
+func (*LabelSelectorRequirement) ProtoMessage() {}
+
+func (m *ScheduledJob) Reset() { *m = ScheduledJob{} }
+func (m *ScheduledJob) String() string { return proto.CompactTextString(m) }
+func (*ScheduledJob) ProtoMessage() {}
+
+func (m *ScheduledJobList) Reset() { *m = ScheduledJobList{} }
+func (m *ScheduledJobList) String() string { return proto.CompactTextString(m) }
+func (*ScheduledJobList) ProtoMessage() {}
+
+func (m *ScheduledJobSpec) Reset() { *m = ScheduledJobSpec{} }
+func (m *ScheduledJobSpec) String() string { return proto.CompactTextString(m) }
+func (*ScheduledJobSpec) ProtoMessage() {}
+
+func (m *ScheduledJobStatus) Reset() { *m = ScheduledJobStatus{} }
+func (m *ScheduledJobStatus) String() string { return proto.CompactTextString(m) }
+func (*ScheduledJobStatus) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*Job)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.Job")
+ proto.RegisterType((*JobCondition)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobCondition")
+ proto.RegisterType((*JobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobList")
+ proto.RegisterType((*JobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobSpec")
+ proto.RegisterType((*JobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobStatus")
+ proto.RegisterType((*JobTemplate)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobTemplate")
+ proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobTemplateSpec")
+ proto.RegisterType((*LabelSelector)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.LabelSelector")
+ proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.LabelSelectorRequirement")
+ proto.RegisterType((*ScheduledJob)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJob")
+ proto.RegisterType((*ScheduledJobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJobList")
+ proto.RegisterType((*ScheduledJobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJobSpec")
+ proto.RegisterType((*ScheduledJobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.ScheduledJobStatus")
+}
+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 (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()))
+ 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.Template.Size()))
+ n12, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ 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()))
+ n13, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n14, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ 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 {
+ for k := range m.MatchLabels {
+ data[i] = 0xa
+ i++
+ v := m.MatchLabels[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 *ScheduledJob) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *ScheduledJob) 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()))
+ n15, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n16, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n17, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *ScheduledJobList) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *ScheduledJobList) 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()))
+ n18, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ 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 *ScheduledJobSpec) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *ScheduledJobSpec) 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()))
+ n19, err := m.JobTemplate.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ return i, nil
+}
+
+func (m *ScheduledJobStatus) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *ScheduledJobStatus) 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()))
+ n20, err := m.LastScheduleTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ 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 (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 (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 *ScheduledJob) 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 *ScheduledJobList) 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 *ScheduledJobSpec) 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))
+ return n
+}
+
+func (m *ScheduledJobStatus) 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 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 *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 = &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_kubernetes_pkg_api_unversioned.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_kubernetes_pkg_api_unversioned.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 (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 (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
+ 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
+ if m.MatchLabels == nil {
+ m.MatchLabels = make(map[string]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 *ScheduledJob) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScheduledJob: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScheduledJob: 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 *ScheduledJobList) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScheduledJobList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScheduledJobList: 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, ScheduledJob{})
+ 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 *ScheduledJobSpec) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScheduledJobSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScheduledJobSpec: 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScheduledJobStatus) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScheduledJobStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScheduledJobStatus: 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_kubernetes_pkg_api_unversioned.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 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
new file mode 100644
index 0000000..41e2001
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
@@ -0,0 +1,254 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v2alpha1";
+
+// Job represents the configuration of a single job.
+message Job {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional JobSpec spec = 2;
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
+
+ // Last time the condition transit from one status to another.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ optional string message = 6;
+}
+
+// JobList is a collection of jobs.
+message JobList {
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of Job.
+ repeated Job items = 2;
+}
+
+// JobSpec describes how the job execution will look like.
+message JobSpec {
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ optional int32 parallelism = 1;
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ 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 int64 activeDeadlineSeconds = 3;
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional 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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
+ optional bool manualSelector = 5;
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6;
+}
+
+// JobStatus represents the current state of a Job.
+message JobStatus {
+ // Conditions represent the latest available observations of an object's current state.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ repeated JobCondition conditions = 1;
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // 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 k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2;
+
+ // 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.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3;
+
+ // Active is the number of actively running pods.
+ optional int32 active = 4;
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ optional int32 succeeded = 5;
+
+ // Failed is the number of pods which reached Phase Failed.
+ optional int32 failed = 6;
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+message JobTemplate {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Template defines jobs that will be created from this template
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional JobSpec spec = 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.
+ map<string, string> matchLabels = 1;
+
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ 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.
+ 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.
+ repeated string values = 3;
+}
+
+// ScheduledJob represents the configuration of a single scheduled job.
+message ScheduledJob {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec is a structure defining the expected behavior of a job, including the schedule.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ScheduledJobSpec spec = 2;
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ScheduledJobStatus status = 3;
+}
+
+// ScheduledJobList is a collection of scheduled jobs.
+message ScheduledJobList {
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of ScheduledJob.
+ repeated ScheduledJob items = 2;
+}
+
+// ScheduledJobSpec describes how the job execution will look like and when it will actually run.
+message ScheduledJobSpec {
+ // Schedule contains 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 int64 startingDeadlineSeconds = 2;
+
+ // ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
+ optional string concurrencyPolicy = 3;
+
+ // Suspend flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ optional bool suspend = 4;
+
+ // JobTemplate is the object that describes the job that will be created when
+ // executing a ScheduledJob.
+ optional JobTemplateSpec jobTemplate = 5;
+}
+
+// ScheduledJobStatus represents the current state of a Job.
+message ScheduledJobStatus {
+ // Active holds pointers to currently running jobs.
+ repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1;
+
+ // LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScheduleTime = 4;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go
new file mode 100644
index 0000000..54f0d62
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v2alpha1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ &JobTemplate{},
+ &ScheduledJob{},
+ &ScheduledJobList{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go
new file mode 100644
index 0000000..bd48550
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go
@@ -0,0 +1,5310 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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"
+ pkg4_resource "k8s.io/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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 pkg4_resource.Quantity
+ var v1 pkg1_unversioned.TypeMeta
+ var v2 pkg2_v1.ObjectMeta
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = JobSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = JobStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Template
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Template
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = JobTemplateSpec{}
+ } else {
+ yyv5 := &x.Template
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Template = JobTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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 = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv7 := &x.ObjectMeta
+ 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.Spec = JobSpec{}
+ } else {
+ yyv8 := &x.Spec
+ 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 *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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ } 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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ 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(LabelSelector)
+ }
+ x.Selector.CodecDecodeSelf(d)
+ }
+ case "manualSelector":
+ if r.TryDecodeAsNil() {
+ if x.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = r.DecodeBool()
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv13 := &x.Template
+ yyv13.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 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.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = 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.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = 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.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.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.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = 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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.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 *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_unversioned.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_unversioned.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 {
+ x.Active = int32(r.DecodeInt(32))
+ }
+ case "succeeded":
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ x.Succeeded = int32(r.DecodeInt(32))
+ }
+ case "failed":
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ x.Failed = 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 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.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(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.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_unversioned.Time)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, 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() {
+ if x.CompletionTime != nil {
+ x.CompletionTime = nil
+ }
+ } else {
+ if x.CompletionTime == nil {
+ x.CompletionTime = new(pkg1_unversioned.Time)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, 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.Active = 0
+ } else {
+ x.Active = 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.Succeeded = 0
+ } else {
+ x.Succeeded = 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.Failed = 0
+ } else {
+ x.Failed = 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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = pkg2_v1.ConditionStatus(r.DecodeString())
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = pkg2_v1.ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastProbeTime
+ 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.LastTransitionTime = pkg1_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ScheduledJobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScheduledJobStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScheduledJob) 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ScheduledJobSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ScheduledJobStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceScheduledJob(([]ScheduledJob)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceScheduledJob((*[]ScheduledJob)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScheduledJobList) 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceScheduledJob((*[]ScheduledJob)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.StartingDeadlineSeconds != nil
+ yyq2[2] = x.ConcurrencyPolicy != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } 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.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 x.Suspend == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Suspend
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ 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_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Schedule = string(r.DecodeString())
+ }
+ case "startingDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "concurrencyPolicy":
+ if r.TryDecodeAsNil() {
+ x.ConcurrencyPolicy = ""
+ } else {
+ x.ConcurrencyPolicy = ConcurrencyPolicy(r.DecodeString())
+ }
+ case "suspend":
+ if r.TryDecodeAsNil() {
+ if x.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ case "jobTemplate":
+ if r.TryDecodeAsNil() {
+ x.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv10 := &x.JobTemplate
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScheduledJobSpec) 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.Schedule = ""
+ } else {
+ x.Schedule = string(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.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.ConcurrencyPolicy = ""
+ } else {
+ x.ConcurrencyPolicy = ConcurrencyPolicy(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.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ 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.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv18 := &x.JobTemplate
+ 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 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 *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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(([]pkg2_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(([]pkg2_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 *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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((*[]pkg2_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_unversioned.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 *ScheduledJobStatus) 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((*[]pkg2_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_unversioned.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 *LabelSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.MatchLabels) != 0
+ yyq2[1] = len(x.MatchExpressions) != 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.MatchLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.MatchLabels, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchLabels"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.MatchLabels, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchExpressions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LabelSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LabelSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "matchLabels":
+ if r.TryDecodeAsNil() {
+ x.MatchLabels = nil
+ } else {
+ yyv4 := &x.MatchLabels
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv4, false, d)
+ }
+ }
+ case "matchExpressions":
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv6 := &x.MatchExpressions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LabelSelector) 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.MatchLabels = nil
+ } else {
+ yyv9 := &x.MatchLabels
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecMapStringStringX(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.MatchExpressions = nil
+ } else {
+ yyv11 := &x.MatchExpressions
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(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 *LabelSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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 *LabelSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LabelSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = LabelSelectorOperator(r.DecodeString())
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv6 := &x.Values
+ 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 *LabelSelectorRequirement) 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = LabelSelectorOperator(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.Values = nil
+ } else {
+ yyv11 := &x.Values
+ 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 LabelSelectorOperator) 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 *LabelSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var 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) 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, 792)
+ 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
+ }
+}
+
+func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, 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) decSliceScheduledJob(v *[]ScheduledJob, 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 = []ScheduledJob{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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, 1024)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ScheduledJob, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ScheduledJob, 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] = ScheduledJob{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ScheduledJob{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ScheduledJob{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ScheduledJob{}) // var yyz1 ScheduledJob
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ScheduledJob{}
+ } 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 = []ScheduledJob{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_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 *[]pkg2_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 = []pkg2_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([]pkg2_v1.ObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_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] = pkg2_v1.ObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg2_v1.ObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_v1.ObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) // var yyz1 pkg2_v1.ObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_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 = []pkg2_v1.ObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequirement, 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) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequirement, 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 = []LabelSelectorRequirement{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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([]LabelSelectorRequirement, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LabelSelectorRequirement, 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] = LabelSelectorRequirement{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LabelSelectorRequirement{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LabelSelectorRequirement{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LabelSelectorRequirement{}) // var yyz1 LabelSelectorRequirement
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LabelSelectorRequirement{}
+ } 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 = []LabelSelectorRequirement{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go
new file mode 100644
index 0000000..0402df2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go
@@ -0,0 +1,283 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// Job represents the configuration of a single job.
+type Job struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Job.
+ Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+type JobTemplate struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Template defines jobs that will be created from this template
+ // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ 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
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
+ ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+
+ // Conditions represent the latest available observations of an object's current state.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
+
+ // 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.
+ CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
+
+ // Active is the number of actively running pods.
+ Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
+
+ // Failed is the number of pods which reached Phase Failed.
+ 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.
+ LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transit from one status to another.
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+// ScheduledJob represents the configuration of a single scheduled job.
+type ScheduledJob struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is a structure defining the expected behavior of a job, including the schedule.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec ScheduledJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status ScheduledJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ScheduledJobList is a collection of scheduled jobs.
+type ScheduledJobList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ScheduledJob.
+ Items []ScheduledJob `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ScheduledJobSpec describes how the job execution will look like and when it will actually run.
+type ScheduledJobSpec struct {
+
+ // Schedule contains 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.
+ StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
+
+ // ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
+ ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
+
+ // Suspend flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ Suspend *bool `json:"suspend" protobuf:"varint,4,opt,name=suspend"`
+
+ // JobTemplate is the object that describes the job that will be created when
+ // executing a ScheduledJob.
+ JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
+}
+
+// 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 ScheduledJobs 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"
+)
+
+// ScheduledJobStatus represents the current state of a Job.
+type ScheduledJobStatus struct {
+ // Active holds pointers to currently running jobs.
+ Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
+
+ // LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
+ LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
+}
+
+// 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.
+ 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.
+ 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.
+ 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.
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..17d4331
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,178 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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_Job = map[string]string{
+ "": "Job represents the configuration of a single job.",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is the list of Job.",
+}
+
+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": "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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "completions": "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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "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": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md",
+ "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+}
+
+func (JobSpec) SwaggerDoc() map[string]string {
+ return map_JobSpec
+}
+
+var map_JobStatus = map[string]string{
+ "": "JobStatus represents the current state of a Job.",
+ "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "startTime": "StartTime represents time when the job was acknowledged by the Job Manager. 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": "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": "Active is the number of actively running pods.",
+ "succeeded": "Succeeded is the number of pods which reached Phase Succeeded.",
+ "failed": "Failed is the number of pods which reached Phase Failed.",
+}
+
+func (JobStatus) SwaggerDoc() map[string]string {
+ return map_JobStatus
+}
+
+var map_JobTemplate = map[string]string{
+ "": "JobTemplate describes a template for creating copies of a predefined pod.",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "template": "Template defines jobs that will be created from this template http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+}
+
+func (JobTemplateSpec) SwaggerDoc() map[string]string {
+ return map_JobTemplateSpec
+}
+
+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_ScheduledJob = map[string]string{
+ "": "ScheduledJob represents the configuration of a single scheduled job.",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+}
+
+func (ScheduledJob) SwaggerDoc() map[string]string {
+ return map_ScheduledJob
+}
+
+var map_ScheduledJobList = map[string]string{
+ "": "ScheduledJobList is a collection of scheduled jobs.",
+ "metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ScheduledJob.",
+}
+
+func (ScheduledJobList) SwaggerDoc() map[string]string {
+ return map_ScheduledJobList
+}
+
+var map_ScheduledJobSpec = map[string]string{
+ "": "ScheduledJobSpec describes how the job execution will look like and when it will actually run.",
+ "schedule": "Schedule contains 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": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.",
+ "suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
+ "jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a ScheduledJob.",
+}
+
+func (ScheduledJobSpec) SwaggerDoc() map[string]string {
+ return map_ScheduledJobSpec
+}
+
+var map_ScheduledJobStatus = map[string]string{
+ "": "ScheduledJobStatus represents the current state of a Job.",
+ "active": "Active holds pointers to currently running jobs.",
+ "lastScheduleTime": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.",
+}
+
+func (ScheduledJobStatus) SwaggerDoc() map[string]string {
+ return map_ScheduledJobStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/deep_copy_generated.go
new file mode 100644
index 0000000..07b1b2d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/deep_copy_generated.go
@@ -0,0 +1,120 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_certificates_CertificateSigningRequest,
+ DeepCopy_certificates_CertificateSigningRequestCondition,
+ DeepCopy_certificates_CertificateSigningRequestList,
+ DeepCopy_certificates_CertificateSigningRequestSpec,
+ DeepCopy_certificates_CertificateSigningRequestStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_certificates_CertificateSigningRequest(in CertificateSigningRequest, out *CertificateSigningRequest, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_certificates_CertificateSigningRequestCondition(in CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ return nil
+}
+
+func DeepCopy_certificates_CertificateSigningRequestList(in CertificateSigningRequestList, out *CertificateSigningRequestList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_certificates_CertificateSigningRequestSpec(in CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, c *conversion.Cloner) error {
+ if in.Request != nil {
+ in, out := in.Request, &out.Request
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Request = nil
+ }
+ out.Username = in.Username
+ out.UID = in.UID
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Groups = nil
+ }
+ return nil
+}
+
+func DeepCopy_certificates_CertificateSigningRequestStatus(in CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.Certificate != nil {
+ in, out := in.Certificate, &out.Certificate
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Certificate = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go
new file mode 100644
index 0000000..d2897cb
--- /dev/null
+++ b/src/kube2msb/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
+
+package certificates
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go
new file mode 100644
index 0000000..cf54da4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go
@@ -0,0 +1,131 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/certificates"
+ "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/certificates"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", certificates.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions therecertificates
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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(
+ "CertificateSigningRequest",
+ )
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(certificates.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ certificates.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1alpha1.SchemeGroupVersion:
+ v1alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go
new file mode 100644
index 0000000..d232b3c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/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 certificates
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "certificates"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &CertificateSigningRequest{},
+ &CertificateSigningRequestList{},
+ &api.ListOptions{},
+ &api.DeleteOptions{},
+ )
+}
+
+func (obj *CertificateSigningRequest) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
+func (obj *CertificateSigningRequestList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.generated.go
new file mode 100644
index 0000000..21798df
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.generated.go
@@ -0,0 +1,1963 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 certificates
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_api "k8s.io/kubernetes/pkg/api"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_types "k8s.io/kubernetes/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 pkg2_api.ObjectMeta
+ var v1 pkg1_unversioned.TypeMeta
+ var v2 pkg3_types.UID
+ var v3 time.Time
+ _, _, _, _ = v0, v1, v2, v3
+ }
+}
+
+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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = CertificateSigningRequestSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = CertificateSigningRequestSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Username != ""
+ yyq2[2] = x.UID != ""
+ yyq2[3] = len(x.Groups) != 0
+ 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 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] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("username"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ 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_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 "username":
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ x.Username = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = string(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)
+ }
+ }
+ 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 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.Request = nil
+ } else {
+ yyv11 := &x.Request
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, 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.Username = ""
+ } else {
+ x.Username = string(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.UID = ""
+ } else {
+ x.UID = string(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.Groups = nil
+ } else {
+ yyv15 := &x.Groups
+ 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 *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 {
+ x.Type = RequestConditionType(r.DecodeString())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_unversioned.Time{}
+ } else {
+ yyv7 := &x.LastUpdateTime
+ 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)
+ }
+ }
+ 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 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.Type = ""
+ } else {
+ x.Type = RequestConditionType(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 {
+ x.Reason = string(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.Message = ""
+ } else {
+ x.Message = string(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.LastUpdateTime = pkg1_unversioned.Time{}
+ } else {
+ yyv13 := &x.LastUpdateTime
+ 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)
+ }
+ }
+ 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 *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] = true
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 368)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go
new file mode 100644
index 0000000..c0eb47b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go
@@ -0,0 +1,85 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Describes a certificate signing request
+type CertificateSigningRequest struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // The certificate request itself and any additonal information.
+ Spec CertificateSigningRequestSpec `json:"spec,omitempty"`
+
+ // Derived information about the request.
+ Status CertificateSigningRequestStatus `json:"status,omitempty"`
+}
+
+// This information is immutable after the request is created. Only the Request
+// and ExtraInfo 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"`
+
+ // Information about the requesting user (if relevant)
+ // See user.Info interface for details
+ Username string `json:"username,omitempty"`
+ UID string `json:"uid,omitempty"`
+ Groups []string `json:"groups,omitempty"`
+}
+
+type CertificateSigningRequestStatus struct {
+ // Conditions applied to the request, such as approval or denial.
+ Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"`
+
+ // If request was approved, the controller will place the issued certificate here.
+ Certificate []byte `json:"certificate,omitempty"`
+}
+
+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"`
+ // brief reason for the request state
+ Reason string `json:"reason,omitempty"`
+ // human readable message with details about the request state
+ Message string `json:"message,omitempty"`
+ // timestamp for the last update to this condition
+ LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"`
+}
+
+type CertificateSigningRequestList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []CertificateSigningRequest `json:"items,omitempty"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.go
new file mode 100644
index 0000000..0b933b2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.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.
+*/
+
+package v1alpha1
+
+import "k8s.io/kubernetes/pkg/runtime"
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // Add non-generated conversion functions here. Currently there are none.
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion_generated.go
new file mode 100644
index 0000000..454a98b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion_generated.go
@@ -0,0 +1,237 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ certificates "k8s.io/kubernetes/pkg/apis/certificates"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest,
+ Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest,
+ Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition,
+ Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition,
+ Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList,
+ Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList,
+ Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec,
+ Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec,
+ Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus,
+ Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
+ return autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in, out, s)
+}
+
+func autoConvert_v1alpha1_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
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error {
+ return autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error {
+ out.Type = RequestConditionType(in.Type)
+ out.Reason = in.Reason
+ out.Message = in.Message
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in, out, s)
+}
+
+func autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]certificates.CertificateSigningRequest, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CertificateSigningRequest, len(*in))
+ for i := range *in {
+ if err := Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in, out, s)
+}
+
+func autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error {
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Request, &out.Request, s); err != nil {
+ return err
+ }
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = in.Groups
+ return nil
+}
+
+func Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error {
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Request, &out.Request, s); err != nil {
+ return err
+ }
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = in.Groups
+ return nil
+}
+
+func Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in, out, s)
+}
+
+func autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]certificates.CertificateSigningRequestCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Certificate, &out.Certificate, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error {
+ return autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]CertificateSigningRequestCondition, len(*in))
+ for i := range *in {
+ if err := Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Certificate, &out.Certificate, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..5b4a3ad
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/deep_copy_generated.go
@@ -0,0 +1,121 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1alpha1_CertificateSigningRequest,
+ DeepCopy_v1alpha1_CertificateSigningRequestCondition,
+ DeepCopy_v1alpha1_CertificateSigningRequestList,
+ DeepCopy_v1alpha1_CertificateSigningRequestSpec,
+ DeepCopy_v1alpha1_CertificateSigningRequestStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1alpha1_CertificateSigningRequest(in CertificateSigningRequest, out *CertificateSigningRequest, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1alpha1_CertificateSigningRequestStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ return nil
+}
+
+func DeepCopy_v1alpha1_CertificateSigningRequestList(in CertificateSigningRequestList, out *CertificateSigningRequestList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]CertificateSigningRequest, len(in))
+ for i := range in {
+ if err := DeepCopy_v1alpha1_CertificateSigningRequest(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, c *conversion.Cloner) error {
+ if in.Request != nil {
+ in, out := in.Request, &out.Request
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Request = nil
+ }
+ out.Username = in.Username
+ out.UID = in.UID
+ if in.Groups != nil {
+ in, out := in.Groups, &out.Groups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Groups = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, c *conversion.Cloner) error {
+ if in.Conditions != nil {
+ in, out := in.Conditions, &out.Conditions
+ *out = make([]CertificateSigningRequestCondition, len(in))
+ for i := range in {
+ if err := DeepCopy_v1alpha1_CertificateSigningRequestCondition(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.Certificate != nil {
+ in, out := in.Certificate, &out.Certificate
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Certificate = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/doc.go
new file mode 100644
index 0000000..3528c16
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates
+
+package v1alpha1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go
new file mode 100644
index 0000000..174d7ef
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go
@@ -0,0 +1,1192 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/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/certificates/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ CertificateSigningRequest
+ CertificateSigningRequestCondition
+ CertificateSigningRequestList
+ CertificateSigningRequestSpec
+ CertificateSigningRequestStatus
+*/
+package v1alpha1
+
+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
+
+func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} }
+func (m *CertificateSigningRequest) String() string { return proto.CompactTextString(m) }
+func (*CertificateSigningRequest) ProtoMessage() {}
+
+func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} }
+func (m *CertificateSigningRequestCondition) String() string { return proto.CompactTextString(m) }
+func (*CertificateSigningRequestCondition) ProtoMessage() {}
+
+func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} }
+func (m *CertificateSigningRequestList) String() string { return proto.CompactTextString(m) }
+func (*CertificateSigningRequestList) ProtoMessage() {}
+
+func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} }
+func (m *CertificateSigningRequestSpec) String() string { return proto.CompactTextString(m) }
+func (*CertificateSigningRequestSpec) ProtoMessage() {}
+
+func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} }
+func (m *CertificateSigningRequestStatus) String() string { return proto.CompactTextString(m) }
+func (*CertificateSigningRequestStatus) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequest")
+ proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestCondition")
+ proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestList")
+ proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestSpec")
+ proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestStatus")
+}
+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)
+ }
+ }
+ 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 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))
+ }
+ }
+ 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 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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto
new file mode 100644
index 0000000..450b374
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto
@@ -0,0 +1,86 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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.v1alpha1;
+
+import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// Describes a certificate signing request
+message CertificateSigningRequest {
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // The certificate request itself and any additonal information.
+ optional CertificateSigningRequestSpec spec = 2;
+
+ // Derived information about the request.
+ optional CertificateSigningRequestStatus status = 3;
+}
+
+message CertificateSigningRequestCondition {
+ // request approval state, currently Approved or Denied.
+ optional string type = 1;
+
+ // brief reason for the request state
+ optional string reason = 2;
+
+ // human readable message with details about the request state
+ optional string message = 3;
+
+ // timestamp for the last update to this condition
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastUpdateTime = 4;
+}
+
+message CertificateSigningRequestList {
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ repeated CertificateSigningRequest items = 2;
+}
+
+// This information is immutable after the request is created. Only the Request
+// and ExtraInfo 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;
+
+ // Information about the requesting user (if relevant)
+ // See user.Info interface for details
+ optional string username = 2;
+
+ optional string uid = 3;
+
+ repeated string groups = 4;
+}
+
+message CertificateSigningRequestStatus {
+ // Conditions applied to the request, such as approval or denial.
+ repeated CertificateSigningRequestCondition conditions = 1;
+
+ // If request was approved, the controller will place the issued certificate here.
+ optional bytes certificate = 2;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/register.go
new file mode 100644
index 0000000..7b841c0
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/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 v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "certificates"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ // addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &CertificateSigningRequest{},
+ &CertificateSigningRequestList{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+
+ // Add the watch version that applies
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
+
+func (obj *CertificateSigningRequest) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
+func (obj *CertificateSigningRequestList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go
new file mode 100644
index 0000000..74d6765
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go
@@ -0,0 +1,1963 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_types "k8s.io/kubernetes/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_unversioned.TypeMeta
+ var v1 pkg2_v1.ObjectMeta
+ var v2 pkg3_types.UID
+ var v3 time.Time
+ _, _, _, _ = v0, v1, v2, v3
+ }
+}
+
+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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = CertificateSigningRequestSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = CertificateSigningRequestSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Username != ""
+ yyq2[2] = x.UID != ""
+ yyq2[3] = len(x.Groups) != 0
+ 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 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] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("username"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ 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_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 "username":
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ x.Username = string(r.DecodeString())
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ x.UID = string(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)
+ }
+ }
+ 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 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.Request = nil
+ } else {
+ yyv11 := &x.Request
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, 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.Username = ""
+ } else {
+ x.Username = string(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.UID = ""
+ } else {
+ x.UID = string(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.Groups = nil
+ } else {
+ yyv15 := &x.Groups
+ 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 *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 {
+ x.Type = RequestConditionType(r.DecodeString())
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(r.DecodeString())
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_unversioned.Time{}
+ } else {
+ yyv7 := &x.LastUpdateTime
+ 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)
+ }
+ }
+ 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 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.Type = ""
+ } else {
+ x.Type = RequestConditionType(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 {
+ x.Reason = string(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.Message = ""
+ } else {
+ x.Message = string(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.LastUpdateTime = pkg1_unversioned.Time{}
+ } else {
+ yyv13 := &x.LastUpdateTime
+ 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)
+ }
+ }
+ 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 *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] = true
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 368)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go
new file mode 100644
index 0000000..5f046ba
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go
@@ -0,0 +1,85 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Describes a certificate signing request
+type CertificateSigningRequest struct {
+ unversioned.TypeMeta `json:",inline"`
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The certificate request itself and any additonal information.
+ Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Derived information about the request.
+ Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// This information is immutable after the request is created. Only the Request
+// and ExtraInfo 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"`
+
+ // Information about the requesting user (if relevant)
+ // See user.Info interface for details
+ Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"`
+ UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"`
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
+}
+
+type CertificateSigningRequestStatus struct {
+ // Conditions applied to the request, such as approval or denial.
+ Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
+
+ // If request was approved, the controller will place the issued certificate here.
+ 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
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // human readable message with details about the request state
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // timestamp for the last update to this condition
+ LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"`
+}
+
+type CertificateSigningRequestList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ Items []CertificateSigningRequest `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..47b3b28
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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_CertificateSigningRequest = map[string]string{
+ "": "Describes a certificate signing request",
+ "spec": "The certificate request itself and any additonal 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 ExtraInfo 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",
+ "username": "Information about the requesting user (if relevant) 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/deep_copy_generated.go
new file mode 100644
index 0000000..37615c4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/deep_copy_generated.go
@@ -0,0 +1,299 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 componentconfig
+
+import (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_componentconfig_IPVar,
+ DeepCopy_componentconfig_KubeControllerManagerConfiguration,
+ DeepCopy_componentconfig_KubeProxyConfiguration,
+ DeepCopy_componentconfig_KubeSchedulerConfiguration,
+ DeepCopy_componentconfig_KubeletConfiguration,
+ DeepCopy_componentconfig_LeaderElectionConfiguration,
+ DeepCopy_componentconfig_PersistentVolumeRecyclerConfiguration,
+ DeepCopy_componentconfig_PortRangeVar,
+ DeepCopy_componentconfig_VolumeConfiguration,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_componentconfig_IPVar(in IPVar, out *IPVar, c *conversion.Cloner) error {
+ if in.Val != nil {
+ in, out := in.Val, &out.Val
+ *out = new(string)
+ **out = *in
+ } else {
+ out.Val = nil
+ }
+ return nil
+}
+
+func DeepCopy_componentconfig_KubeControllerManagerConfiguration(in KubeControllerManagerConfiguration, out *KubeControllerManagerConfiguration, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Port = in.Port
+ out.Address = in.Address
+ out.CloudProvider = in.CloudProvider
+ out.CloudConfigFile = in.CloudConfigFile
+ out.ConcurrentEndpointSyncs = in.ConcurrentEndpointSyncs
+ out.ConcurrentRSSyncs = in.ConcurrentRSSyncs
+ out.ConcurrentRCSyncs = in.ConcurrentRCSyncs
+ out.ConcurrentResourceQuotaSyncs = in.ConcurrentResourceQuotaSyncs
+ out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
+ out.ConcurrentDaemonSetSyncs = in.ConcurrentDaemonSetSyncs
+ out.ConcurrentJobSyncs = in.ConcurrentJobSyncs
+ out.ConcurrentNamespaceSyncs = in.ConcurrentNamespaceSyncs
+ out.ConcurrentSATokenSyncs = in.ConcurrentSATokenSyncs
+ out.LookupCacheSizeForRC = in.LookupCacheSizeForRC
+ out.LookupCacheSizeForRS = in.LookupCacheSizeForRS
+ out.LookupCacheSizeForDaemonSet = in.LookupCacheSizeForDaemonSet
+ out.ServiceSyncPeriod = in.ServiceSyncPeriod
+ out.NodeSyncPeriod = in.NodeSyncPeriod
+ out.ResourceQuotaSyncPeriod = in.ResourceQuotaSyncPeriod
+ out.NamespaceSyncPeriod = in.NamespaceSyncPeriod
+ out.PVClaimBinderSyncPeriod = in.PVClaimBinderSyncPeriod
+ out.MinResyncPeriod = in.MinResyncPeriod
+ out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold
+ out.HorizontalPodAutoscalerSyncPeriod = in.HorizontalPodAutoscalerSyncPeriod
+ out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
+ out.PodEvictionTimeout = in.PodEvictionTimeout
+ out.DeletingPodsQps = in.DeletingPodsQps
+ out.DeletingPodsBurst = in.DeletingPodsBurst
+ out.NodeMonitorGracePeriod = in.NodeMonitorGracePeriod
+ out.RegisterRetryCount = in.RegisterRetryCount
+ out.NodeStartupGracePeriod = in.NodeStartupGracePeriod
+ out.NodeMonitorPeriod = in.NodeMonitorPeriod
+ out.ServiceAccountKeyFile = in.ServiceAccountKeyFile
+ out.EnableProfiling = in.EnableProfiling
+ out.ClusterName = in.ClusterName
+ out.ClusterCIDR = in.ClusterCIDR
+ out.ServiceCIDR = in.ServiceCIDR
+ out.NodeCIDRMaskSize = in.NodeCIDRMaskSize
+ out.AllocateNodeCIDRs = in.AllocateNodeCIDRs
+ out.ConfigureCloudRoutes = in.ConfigureCloudRoutes
+ out.RootCAFile = in.RootCAFile
+ out.ContentType = in.ContentType
+ out.KubeAPIQPS = in.KubeAPIQPS
+ out.KubeAPIBurst = in.KubeAPIBurst
+ out.LeaderElection = in.LeaderElection
+ out.VolumeConfiguration = in.VolumeConfiguration
+ out.ControllerStartInterval = in.ControllerStartInterval
+ out.EnableGarbageCollector = in.EnableGarbageCollector
+ return nil
+}
+
+func DeepCopy_componentconfig_KubeProxyConfiguration(in KubeProxyConfiguration, out *KubeProxyConfiguration, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.BindAddress = in.BindAddress
+ out.ClusterCIDR = in.ClusterCIDR
+ out.HealthzBindAddress = in.HealthzBindAddress
+ out.HealthzPort = in.HealthzPort
+ out.HostnameOverride = in.HostnameOverride
+ if in.IPTablesMasqueradeBit != nil {
+ in, out := in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.IPTablesMasqueradeBit = nil
+ }
+ out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
+ out.KubeconfigPath = in.KubeconfigPath
+ out.MasqueradeAll = in.MasqueradeAll
+ out.Master = in.Master
+ if in.OOMScoreAdj != nil {
+ in, out := in.OOMScoreAdj, &out.OOMScoreAdj
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.OOMScoreAdj = nil
+ }
+ out.Mode = in.Mode
+ out.PortRange = in.PortRange
+ out.ResourceContainer = in.ResourceContainer
+ out.UDPIdleTimeout = in.UDPIdleTimeout
+ out.ConntrackMax = in.ConntrackMax
+ out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
+ return nil
+}
+
+func DeepCopy_componentconfig_KubeSchedulerConfiguration(in KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Port = in.Port
+ out.Address = in.Address
+ out.AlgorithmProvider = in.AlgorithmProvider
+ out.PolicyConfigFile = in.PolicyConfigFile
+ out.EnableProfiling = in.EnableProfiling
+ out.ContentType = in.ContentType
+ out.KubeAPIQPS = in.KubeAPIQPS
+ out.KubeAPIBurst = in.KubeAPIBurst
+ out.SchedulerName = in.SchedulerName
+ out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
+ out.FailureDomains = in.FailureDomains
+ out.LeaderElection = in.LeaderElection
+ return nil
+}
+
+func DeepCopy_componentconfig_KubeletConfiguration(in KubeletConfiguration, out *KubeletConfiguration, c *conversion.Cloner) error {
+ out.Config = in.Config
+ out.SyncFrequency = in.SyncFrequency
+ out.FileCheckFrequency = in.FileCheckFrequency
+ out.HTTPCheckFrequency = in.HTTPCheckFrequency
+ out.ManifestURL = in.ManifestURL
+ out.ManifestURLHeader = in.ManifestURLHeader
+ out.EnableServer = in.EnableServer
+ out.Address = in.Address
+ out.Port = in.Port
+ out.ReadOnlyPort = in.ReadOnlyPort
+ out.TLSCertFile = in.TLSCertFile
+ out.TLSPrivateKeyFile = in.TLSPrivateKeyFile
+ out.CertDirectory = in.CertDirectory
+ out.HostnameOverride = in.HostnameOverride
+ out.PodInfraContainerImage = in.PodInfraContainerImage
+ out.DockerEndpoint = in.DockerEndpoint
+ out.RootDirectory = in.RootDirectory
+ out.SeccompProfileRoot = in.SeccompProfileRoot
+ out.AllowPrivileged = in.AllowPrivileged
+ out.HostNetworkSources = in.HostNetworkSources
+ out.HostPIDSources = in.HostPIDSources
+ out.HostIPCSources = in.HostIPCSources
+ out.RegistryPullQPS = in.RegistryPullQPS
+ out.RegistryBurst = in.RegistryBurst
+ out.EventRecordQPS = in.EventRecordQPS
+ out.EventBurst = in.EventBurst
+ out.EnableDebuggingHandlers = in.EnableDebuggingHandlers
+ out.MinimumGCAge = in.MinimumGCAge
+ out.MaxPerPodContainerCount = in.MaxPerPodContainerCount
+ out.MaxContainerCount = in.MaxContainerCount
+ out.CAdvisorPort = in.CAdvisorPort
+ out.HealthzPort = in.HealthzPort
+ out.HealthzBindAddress = in.HealthzBindAddress
+ out.OOMScoreAdj = in.OOMScoreAdj
+ out.RegisterNode = in.RegisterNode
+ out.ClusterDomain = in.ClusterDomain
+ out.MasterServiceNamespace = in.MasterServiceNamespace
+ out.ClusterDNS = in.ClusterDNS
+ out.StreamingConnectionIdleTimeout = in.StreamingConnectionIdleTimeout
+ out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
+ out.ImageMinimumGCAge = in.ImageMinimumGCAge
+ out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent
+ out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent
+ out.LowDiskSpaceThresholdMB = in.LowDiskSpaceThresholdMB
+ out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
+ out.NetworkPluginName = in.NetworkPluginName
+ out.NetworkPluginDir = in.NetworkPluginDir
+ out.VolumePluginDir = in.VolumePluginDir
+ out.CloudProvider = in.CloudProvider
+ out.CloudConfigFile = in.CloudConfigFile
+ out.KubeletCgroups = in.KubeletCgroups
+ out.RuntimeCgroups = in.RuntimeCgroups
+ out.SystemCgroups = in.SystemCgroups
+ out.CgroupRoot = in.CgroupRoot
+ out.ContainerRuntime = in.ContainerRuntime
+ out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
+ out.RktPath = in.RktPath
+ out.RktAPIEndpoint = in.RktAPIEndpoint
+ out.RktStage1Image = in.RktStage1Image
+ out.LockFilePath = in.LockFilePath
+ out.ExitOnLockContention = in.ExitOnLockContention
+ out.ConfigureCBR0 = in.ConfigureCBR0
+ out.HairpinMode = in.HairpinMode
+ out.BabysitDaemons = in.BabysitDaemons
+ out.MaxPods = in.MaxPods
+ out.NvidiaGPUs = in.NvidiaGPUs
+ out.DockerExecHandlerName = in.DockerExecHandlerName
+ out.PodCIDR = in.PodCIDR
+ out.ResolverConfig = in.ResolverConfig
+ out.CPUCFSQuota = in.CPUCFSQuota
+ out.Containerized = in.Containerized
+ out.MaxOpenFiles = in.MaxOpenFiles
+ out.ReconcileCIDR = in.ReconcileCIDR
+ out.RegisterSchedulable = in.RegisterSchedulable
+ out.ContentType = in.ContentType
+ out.KubeAPIQPS = in.KubeAPIQPS
+ out.KubeAPIBurst = in.KubeAPIBurst
+ out.SerializeImagePulls = in.SerializeImagePulls
+ out.ExperimentalFlannelOverlay = in.ExperimentalFlannelOverlay
+ out.OutOfDiskTransitionFrequency = in.OutOfDiskTransitionFrequency
+ out.NodeIP = in.NodeIP
+ if in.NodeLabels != nil {
+ in, out := in.NodeLabels, &out.NodeLabels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.NodeLabels = nil
+ }
+ out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
+ out.EnableCustomMetrics = in.EnableCustomMetrics
+ out.EvictionHard = in.EvictionHard
+ out.EvictionSoft = in.EvictionSoft
+ out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
+ out.EvictionPressureTransitionPeriod = in.EvictionPressureTransitionPeriod
+ out.EvictionMaxPodGracePeriod = in.EvictionMaxPodGracePeriod
+ out.PodsPerCore = in.PodsPerCore
+ out.EnableControllerAttachDetach = in.EnableControllerAttachDetach
+ return nil
+}
+
+func DeepCopy_componentconfig_LeaderElectionConfiguration(in LeaderElectionConfiguration, out *LeaderElectionConfiguration, c *conversion.Cloner) error {
+ out.LeaderElect = in.LeaderElect
+ out.LeaseDuration = in.LeaseDuration
+ out.RenewDeadline = in.RenewDeadline
+ out.RetryPeriod = in.RetryPeriod
+ return nil
+}
+
+func DeepCopy_componentconfig_PersistentVolumeRecyclerConfiguration(in PersistentVolumeRecyclerConfiguration, out *PersistentVolumeRecyclerConfiguration, c *conversion.Cloner) error {
+ out.MaximumRetry = in.MaximumRetry
+ out.MinimumTimeoutNFS = in.MinimumTimeoutNFS
+ out.PodTemplateFilePathNFS = in.PodTemplateFilePathNFS
+ out.IncrementTimeoutNFS = in.IncrementTimeoutNFS
+ out.PodTemplateFilePathHostPath = in.PodTemplateFilePathHostPath
+ out.MinimumTimeoutHostPath = in.MinimumTimeoutHostPath
+ out.IncrementTimeoutHostPath = in.IncrementTimeoutHostPath
+ return nil
+}
+
+func DeepCopy_componentconfig_PortRangeVar(in PortRangeVar, out *PortRangeVar, c *conversion.Cloner) error {
+ if in.Val != nil {
+ in, out := in.Val, &out.Val
+ *out = new(string)
+ **out = *in
+ } else {
+ out.Val = nil
+ }
+ return nil
+}
+
+func DeepCopy_componentconfig_VolumeConfiguration(in VolumeConfiguration, out *VolumeConfiguration, c *conversion.Cloner) error {
+ out.EnableHostPathProvisioning = in.EnableHostPathProvisioning
+ out.EnableDynamicProvisioning = in.EnableDynamicProvisioning
+ out.PersistentVolumeRecyclerConfiguration = in.PersistentVolumeRecyclerConfiguration
+ out.FlexVolumePluginDir = in.FlexVolumePluginDir
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/doc.go
new file mode 100644
index 0000000..d044b16
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/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 componentconfig
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/helpers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/helpers.go
new file mode 100644
index 0000000..43b625b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/helpers.go
@@ -0,0 +1,97 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package componentconfig
+
+import (
+ "fmt"
+ "net"
+
+ utilnet "k8s.io/kubernetes/pkg/util/net"
+)
+
+// used for validating command line opts
+// TODO(mikedanese): remove these when we remove command line flags
+
+type IPVar struct {
+ Val *string
+}
+
+func (v IPVar) Set(s string) error {
+ if net.ParseIP(s) == nil {
+ return fmt.Errorf("%q is not a valid IP address", s)
+ }
+ if v.Val == nil {
+ // it's okay to panic here since this is programmer error
+ panic("the string pointer passed into IPVar should not be nil")
+ }
+ *v.Val = s
+ return nil
+}
+
+func (v IPVar) String() string {
+ if v.Val == nil {
+ return ""
+ }
+ return *v.Val
+}
+
+func (v IPVar) Type() string {
+ return "ip"
+}
+
+func (m *ProxyMode) Set(s string) error {
+ *m = ProxyMode(s)
+ return nil
+}
+
+func (m *ProxyMode) String() string {
+ if m != nil {
+ return string(*m)
+ }
+ return ""
+}
+
+func (m *ProxyMode) Type() string {
+ return "ProxyMode"
+}
+
+type PortRangeVar struct {
+ Val *string
+}
+
+func (v PortRangeVar) Set(s string) error {
+ if _, err := utilnet.ParsePortRange(s); err != nil {
+ return fmt.Errorf("%q is not a valid port range: %v", s, err)
+ }
+ if v.Val == nil {
+ // it's okay to panic here since this is programmer error
+ panic("the string pointer passed into PortRangeVar should not be nil")
+ }
+ *v.Val = s
+ return nil
+}
+
+func (v PortRangeVar) String() string {
+ if v.Val == nil {
+ return ""
+ }
+ return *v.Val
+}
+
+func (v PortRangeVar) Type() string {
+ return "port-range"
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go
new file mode 100644
index 0000000..1a8b0cd
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go
@@ -0,0 +1,129 @@
+/*
+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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/componentconfig"
+ "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/componentconfig"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", componentconfig.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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()
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(componentconfig.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ componentconfig.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1alpha1.SchemeGroupVersion:
+ v1alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/register.go
new file mode 100644
index 0000000..599a44e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/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 componentconfig
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+}
+
+// GroupName is the group name use in this package
+const GroupName = "componentconfig"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func addKnownTypes(scheme *runtime.Scheme) {
+ // TODO this will get cleaned up with the scheme types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &KubeProxyConfiguration{},
+ &KubeSchedulerConfiguration{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go
new file mode 100644
index 0000000..c9fd484
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.generated.go
@@ -0,0 +1,9703 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 componentconfig
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ "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_unversioned.TypeMeta
+ var v1 time.Duration
+ _, _ = v0, v1
+ }
+}
+
+func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [19]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[17] = x.Kind != ""
+ yyq2[18] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(19)
+ } else {
+ yynn2 = 17
+ 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.BindAddress))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("bindAddress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthzPort))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("healthzPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthzPort))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.IPTablesMasqueradeBit == nil {
+ r.EncodeNil()
+ } else {
+ yy19 := *x.IPTablesMasqueradeBit
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(yy19))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iptablesMasqueradeBit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.IPTablesMasqueradeBit == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.IPTablesMasqueradeBit
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(yy21))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy24 := &x.IPTablesSyncPeriod
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy24) {
+ } else if !yym25 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy24)
+ } else {
+ z.EncFallback(yy24)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iptablesSyncPeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy26 := &x.IPTablesSyncPeriod
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy26) {
+ } else if !yym27 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy26)
+ } else {
+ z.EncFallback(yy26)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeconfigPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeBool(bool(x.MasqueradeAll))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("masqueradeAll"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeBool(bool(x.MasqueradeAll))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Master))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("master"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Master))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.OOMScoreAdj == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.OOMScoreAdj
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeInt(int64(yy38))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OOMScoreAdj == nil {
+ r.EncodeNil()
+ } else {
+ yy40 := *x.OOMScoreAdj
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeInt(int64(yy40))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Mode.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Mode.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PortRange))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portRange"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PortRange))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym49 := z.EncBinary()
+ _ = yym49
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeletCgroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy52 := &x.UDPIdleTimeout
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy52) {
+ } else if !yym53 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy52)
+ } else {
+ z.EncFallback(yy52)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("udpTimeoutMilliseconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy54 := &x.UDPIdleTimeout
+ yym55 := z.EncBinary()
+ _ = yym55
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy54) {
+ } else if !yym55 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy54)
+ } else {
+ z.EncFallback(yy54)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym57 := z.EncBinary()
+ _ = yym57
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConntrackMax))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conntrackMax"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConntrackMax))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy60 := &x.ConntrackTCPEstablishedTimeout
+ yym61 := z.EncBinary()
+ _ = yym61
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy60) {
+ } else if !yym61 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy60)
+ } else {
+ z.EncFallback(yy60)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conntrackTCPEstablishedTimeout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy62 := &x.ConntrackTCPEstablishedTimeout
+ yym63 := z.EncBinary()
+ _ = yym63
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy62) {
+ } else if !yym63 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy62)
+ } else {
+ z.EncFallback(yy62)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym65 := z.EncBinary()
+ _ = yym65
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym66 := z.EncBinary()
+ _ = yym66
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ yym68 := z.EncBinary()
+ _ = yym68
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym69 := z.EncBinary()
+ _ = yym69
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *KubeProxyConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "bindAddress":
+ if r.TryDecodeAsNil() {
+ x.BindAddress = ""
+ } else {
+ x.BindAddress = string(r.DecodeString())
+ }
+ case "clusterCIDR":
+ if r.TryDecodeAsNil() {
+ x.ClusterCIDR = ""
+ } else {
+ x.ClusterCIDR = string(r.DecodeString())
+ }
+ case "healthzBindAddress":
+ if r.TryDecodeAsNil() {
+ x.HealthzBindAddress = ""
+ } else {
+ x.HealthzBindAddress = string(r.DecodeString())
+ }
+ case "healthzPort":
+ if r.TryDecodeAsNil() {
+ x.HealthzPort = 0
+ } else {
+ x.HealthzPort = int32(r.DecodeInt(32))
+ }
+ case "hostnameOverride":
+ if r.TryDecodeAsNil() {
+ x.HostnameOverride = ""
+ } else {
+ x.HostnameOverride = string(r.DecodeString())
+ }
+ case "iptablesMasqueradeBit":
+ if r.TryDecodeAsNil() {
+ if x.IPTablesMasqueradeBit != nil {
+ x.IPTablesMasqueradeBit = nil
+ }
+ } else {
+ if x.IPTablesMasqueradeBit == nil {
+ x.IPTablesMasqueradeBit = new(int32)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(x.IPTablesMasqueradeBit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "iptablesSyncPeriodSeconds":
+ if r.TryDecodeAsNil() {
+ x.IPTablesSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv11 := &x.IPTablesSyncPeriod
+ 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)
+ }
+ }
+ case "kubeconfigPath":
+ if r.TryDecodeAsNil() {
+ x.KubeconfigPath = ""
+ } else {
+ x.KubeconfigPath = string(r.DecodeString())
+ }
+ case "masqueradeAll":
+ if r.TryDecodeAsNil() {
+ x.MasqueradeAll = false
+ } else {
+ x.MasqueradeAll = bool(r.DecodeBool())
+ }
+ case "master":
+ if r.TryDecodeAsNil() {
+ x.Master = ""
+ } else {
+ x.Master = string(r.DecodeString())
+ }
+ case "oomScoreAdj":
+ if r.TryDecodeAsNil() {
+ if x.OOMScoreAdj != nil {
+ x.OOMScoreAdj = nil
+ }
+ } else {
+ if x.OOMScoreAdj == nil {
+ x.OOMScoreAdj = new(int32)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(x.OOMScoreAdj)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "mode":
+ if r.TryDecodeAsNil() {
+ x.Mode = ""
+ } else {
+ x.Mode = ProxyMode(r.DecodeString())
+ }
+ case "portRange":
+ if r.TryDecodeAsNil() {
+ x.PortRange = ""
+ } else {
+ x.PortRange = string(r.DecodeString())
+ }
+ case "kubeletCgroups":
+ if r.TryDecodeAsNil() {
+ x.ResourceContainer = ""
+ } else {
+ x.ResourceContainer = string(r.DecodeString())
+ }
+ case "udpTimeoutMilliseconds":
+ if r.TryDecodeAsNil() {
+ x.UDPIdleTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv21 := &x.UDPIdleTimeout
+ 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)
+ }
+ }
+ case "conntrackMax":
+ if r.TryDecodeAsNil() {
+ x.ConntrackMax = 0
+ } else {
+ x.ConntrackMax = int32(r.DecodeInt(32))
+ }
+ case "conntrackTCPEstablishedTimeout":
+ if r.TryDecodeAsNil() {
+ x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv24 := &x.ConntrackTCPEstablishedTimeout
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv24) {
+ } else if !yym25 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv24)
+ } else {
+ z.DecFallback(yyv24, false)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *KubeProxyConfiguration) 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.BindAddress = ""
+ } else {
+ x.BindAddress = string(r.DecodeString())
+ }
+ 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.ClusterCIDR = ""
+ } else {
+ x.ClusterCIDR = string(r.DecodeString())
+ }
+ 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.HealthzBindAddress = ""
+ } else {
+ x.HealthzBindAddress = string(r.DecodeString())
+ }
+ 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.HealthzPort = 0
+ } else {
+ x.HealthzPort = int32(r.DecodeInt(32))
+ }
+ 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.HostnameOverride = ""
+ } else {
+ x.HostnameOverride = string(r.DecodeString())
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.IPTablesMasqueradeBit != nil {
+ x.IPTablesMasqueradeBit = nil
+ }
+ } else {
+ if x.IPTablesMasqueradeBit == nil {
+ x.IPTablesMasqueradeBit = new(int32)
+ }
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*int32)(x.IPTablesMasqueradeBit)) = int32(r.DecodeInt(32))
+ }
+ }
+ 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.IPTablesSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv36 := &x.IPTablesSyncPeriod
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv36) {
+ } else if !yym37 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv36)
+ } else {
+ z.DecFallback(yyv36, false)
+ }
+ }
+ 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.KubeconfigPath = ""
+ } else {
+ x.KubeconfigPath = string(r.DecodeString())
+ }
+ 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.MasqueradeAll = false
+ } else {
+ x.MasqueradeAll = bool(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.Master = ""
+ } else {
+ x.Master = string(r.DecodeString())
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.OOMScoreAdj != nil {
+ x.OOMScoreAdj = nil
+ }
+ } else {
+ if x.OOMScoreAdj == nil {
+ x.OOMScoreAdj = new(int32)
+ }
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int32)(x.OOMScoreAdj)) = int32(r.DecodeInt(32))
+ }
+ }
+ 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.Mode = ""
+ } else {
+ x.Mode = ProxyMode(r.DecodeString())
+ }
+ 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.PortRange = ""
+ } else {
+ x.PortRange = string(r.DecodeString())
+ }
+ 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.ResourceContainer = ""
+ } else {
+ x.ResourceContainer = string(r.DecodeString())
+ }
+ 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.UDPIdleTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv46 := &x.UDPIdleTimeout
+ yym47 := z.DecBinary()
+ _ = yym47
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv46) {
+ } else if !yym47 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv46)
+ } else {
+ z.DecFallback(yyv46, false)
+ }
+ }
+ 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.ConntrackMax = 0
+ } else {
+ x.ConntrackMax = int32(r.DecodeInt(32))
+ }
+ 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.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv49 := &x.ConntrackTCPEstablishedTimeout
+ yym50 := z.DecBinary()
+ _ = yym50
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv49) {
+ } else if !yym50 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv49)
+ } else {
+ z.DecFallback(yyv49, false)
+ }
+ }
+ 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.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 ProxyMode) 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 *ProxyMode) CodecDecodeSelf(d *codec1978.Decoder) {
+ var 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 HairpinMode) 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 *HairpinMode) CodecDecodeSelf(d *codec1978.Decoder) {
+ var 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 *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [91]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[48] = x.CloudProvider != ""
+ yyq2[49] = x.CloudConfigFile != ""
+ yyq2[50] = x.KubeletCgroups != ""
+ yyq2[51] = x.RuntimeCgroups != ""
+ yyq2[52] = x.SystemCgroups != ""
+ yyq2[53] = x.CgroupRoot != ""
+ yyq2[55] = true
+ yyq2[56] = x.RktPath != ""
+ yyq2[57] = x.RktAPIEndpoint != ""
+ yyq2[58] = x.RktStage1Image != ""
+ yyq2[79] = true
+ yyq2[80] = x.NodeIP != ""
+ yyq2[84] = x.EvictionHard != ""
+ yyq2[85] = x.EvictionSoft != ""
+ yyq2[86] = x.EvictionSoftGracePeriod != ""
+ yyq2[87] = true
+ yyq2[88] = x.EvictionMaxPodGracePeriod != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(91)
+ } else {
+ yynn2 = 74
+ 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.Config))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("config"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Config))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.SyncFrequency
+ 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("syncFrequency"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.SyncFrequency
+ 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)
+ yy12 := &x.FileCheckFrequency
+ 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("fileCheckFrequency"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.FileCheckFrequency
+ 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_containerArrayElem1234)
+ yy17 := &x.HTTPCheckFrequency
+ 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)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpCheckFrequency"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy19 := &x.HTTPCheckFrequency
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy19) {
+ } else if !yym20 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy19)
+ } else {
+ z.EncFallback(yy19)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("manifestURL"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("manifestURLHeader"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableServer))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableServer"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableServer))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ 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)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Address))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.ReadOnlyPort))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnlyPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.ReadOnlyPort))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym40 := z.EncBinary()
+ _ = yym40
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tLSCertFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tLSPrivateKeyFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("certDirectory"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym49 := z.EncBinary()
+ _ = yym49
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podInfraContainerImage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym55 := z.EncBinary()
+ _ = yym55
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("dockerEndpoint"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym56 := z.EncBinary()
+ _ = yym56
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rootDirectory"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym59 := z.EncBinary()
+ _ = yym59
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym61 := z.EncBinary()
+ _ = yym61
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SeccompProfileRoot))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seccompProfileRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym62 := z.EncBinary()
+ _ = yym62
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SeccompProfileRoot))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym64 := z.EncBinary()
+ _ = yym64
+ if false {
+ } else {
+ r.EncodeBool(bool(x.AllowPrivileged))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowPrivileged"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym65 := z.EncBinary()
+ _ = yym65
+ if false {
+ } else {
+ r.EncodeBool(bool(x.AllowPrivileged))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym67 := z.EncBinary()
+ _ = yym67
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostNetworkSources))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetworkSources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym68 := z.EncBinary()
+ _ = yym68
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostNetworkSources))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym70 := z.EncBinary()
+ _ = yym70
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostPIDSources))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPIDSources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym71 := z.EncBinary()
+ _ = yym71
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostPIDSources))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym73 := z.EncBinary()
+ _ = yym73
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIPCSources))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPCSources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym74 := z.EncBinary()
+ _ = yym74
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIPCSources))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym76 := z.EncBinary()
+ _ = yym76
+ if false {
+ } else {
+ r.EncodeFloat64(float64(x.RegistryPullQPS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registryPullQPS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym77 := z.EncBinary()
+ _ = yym77
+ if false {
+ } else {
+ r.EncodeFloat64(float64(x.RegistryPullQPS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym79 := z.EncBinary()
+ _ = yym79
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RegistryBurst))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registryBurst"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym80 := z.EncBinary()
+ _ = yym80
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RegistryBurst))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym82 := z.EncBinary()
+ _ = yym82
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.EventRecordQPS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("eventRecordQPS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym83 := z.EncBinary()
+ _ = yym83
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.EventRecordQPS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym85 := z.EncBinary()
+ _ = yym85
+ if false {
+ } else {
+ r.EncodeInt(int64(x.EventBurst))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("eventBurst"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym86 := z.EncBinary()
+ _ = yym86
+ if false {
+ } else {
+ r.EncodeInt(int64(x.EventBurst))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym88 := z.EncBinary()
+ _ = yym88
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableDebuggingHandlers))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableDebuggingHandlers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym89 := z.EncBinary()
+ _ = yym89
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableDebuggingHandlers))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy91 := &x.MinimumGCAge
+ yym92 := z.EncBinary()
+ _ = yym92
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy91) {
+ } else if !yym92 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy91)
+ } else {
+ z.EncFallback(yy91)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minimumGCAge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy93 := &x.MinimumGCAge
+ yym94 := z.EncBinary()
+ _ = yym94
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy93) {
+ } else if !yym94 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy93)
+ } else {
+ z.EncFallback(yy93)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym96 := z.EncBinary()
+ _ = yym96
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxPerPodContainerCount))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxPerPodContainerCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym97 := z.EncBinary()
+ _ = yym97
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxPerPodContainerCount))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym99 := z.EncBinary()
+ _ = yym99
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxContainerCount))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxContainerCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym100 := z.EncBinary()
+ _ = yym100
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxContainerCount))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym102 := z.EncBinary()
+ _ = yym102
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.CAdvisorPort))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cAdvisorPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym103 := z.EncBinary()
+ _ = yym103
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.CAdvisorPort))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym105 := z.EncBinary()
+ _ = yym105
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthzPort))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("healthzPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym106 := z.EncBinary()
+ _ = yym106
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthzPort))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym108 := z.EncBinary()
+ _ = yym108
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym109 := z.EncBinary()
+ _ = yym109
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym111 := z.EncBinary()
+ _ = yym111
+ if false {
+ } else {
+ r.EncodeInt(int64(x.OOMScoreAdj))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym112 := z.EncBinary()
+ _ = yym112
+ if false {
+ } else {
+ r.EncodeInt(int64(x.OOMScoreAdj))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym114 := z.EncBinary()
+ _ = yym114
+ if false {
+ } else {
+ r.EncodeBool(bool(x.RegisterNode))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registerNode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym115 := z.EncBinary()
+ _ = yym115
+ if false {
+ } else {
+ r.EncodeBool(bool(x.RegisterNode))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym117 := z.EncBinary()
+ _ = yym117
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterDomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym118 := z.EncBinary()
+ _ = yym118
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym120 := z.EncBinary()
+ _ = yym120
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("masterServiceNamespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym121 := z.EncBinary()
+ _ = yym121
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym123 := z.EncBinary()
+ _ = yym123
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterDNS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym124 := z.EncBinary()
+ _ = yym124
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy126 := &x.StreamingConnectionIdleTimeout
+ yym127 := z.EncBinary()
+ _ = yym127
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy126) {
+ } else if !yym127 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy126)
+ } else {
+ z.EncFallback(yy126)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("streamingConnectionIdleTimeout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy128 := &x.StreamingConnectionIdleTimeout
+ yym129 := z.EncBinary()
+ _ = yym129
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy128) {
+ } else if !yym129 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy128)
+ } else {
+ z.EncFallback(yy128)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy131 := &x.NodeStatusUpdateFrequency
+ yym132 := z.EncBinary()
+ _ = yym132
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy131) {
+ } else if !yym132 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy131)
+ } else {
+ z.EncFallback(yy131)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeStatusUpdateFrequency"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy133 := &x.NodeStatusUpdateFrequency
+ yym134 := z.EncBinary()
+ _ = yym134
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy133) {
+ } else if !yym134 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy133)
+ } else {
+ z.EncFallback(yy133)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy136 := &x.ImageMinimumGCAge
+ yym137 := z.EncBinary()
+ _ = yym137
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy136) {
+ } else if !yym137 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy136)
+ } else {
+ z.EncFallback(yy136)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imageMinimumGCAge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy138 := &x.ImageMinimumGCAge
+ yym139 := z.EncBinary()
+ _ = yym139
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy138) {
+ } else if !yym139 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy138)
+ } else {
+ z.EncFallback(yy138)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym141 := z.EncBinary()
+ _ = yym141
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ImageGCHighThresholdPercent))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imageGCHighThresholdPercent"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym142 := z.EncBinary()
+ _ = yym142
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ImageGCHighThresholdPercent))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym144 := z.EncBinary()
+ _ = yym144
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ImageGCLowThresholdPercent))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imageGCLowThresholdPercent"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym145 := z.EncBinary()
+ _ = yym145
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ImageGCLowThresholdPercent))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym147 := z.EncBinary()
+ _ = yym147
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LowDiskSpaceThresholdMB))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lowDiskSpaceThresholdMB"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym148 := z.EncBinary()
+ _ = yym148
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LowDiskSpaceThresholdMB))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy150 := &x.VolumeStatsAggPeriod
+ yym151 := z.EncBinary()
+ _ = yym151
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy150) {
+ } else if !yym151 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy150)
+ } else {
+ z.EncFallback(yy150)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeStatsAggPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy152 := &x.VolumeStatsAggPeriod
+ yym153 := z.EncBinary()
+ _ = yym153
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy152) {
+ } else if !yym153 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy152)
+ } else {
+ z.EncFallback(yy152)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym155 := z.EncBinary()
+ _ = yym155
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("networkPluginName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym156 := z.EncBinary()
+ _ = yym156
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym158 := z.EncBinary()
+ _ = yym158
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("networkPluginDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym159 := z.EncBinary()
+ _ = yym159
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym161 := z.EncBinary()
+ _ = yym161
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumePluginDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym162 := z.EncBinary()
+ _ = yym162
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[48] {
+ yym164 := z.EncBinary()
+ _ = yym164
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[48] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cloudProvider"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym165 := z.EncBinary()
+ _ = yym165
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[49] {
+ yym167 := z.EncBinary()
+ _ = yym167
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[49] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym168 := z.EncBinary()
+ _ = yym168
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[50] {
+ yym170 := z.EncBinary()
+ _ = yym170
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeletCgroups))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[50] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeletCgroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym171 := z.EncBinary()
+ _ = yym171
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeletCgroups))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[51] {
+ yym173 := z.EncBinary()
+ _ = yym173
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RuntimeCgroups))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[51] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runtimeCgroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym174 := z.EncBinary()
+ _ = yym174
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RuntimeCgroups))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[52] {
+ yym176 := z.EncBinary()
+ _ = yym176
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SystemCgroups))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[52] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("systemContainer"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym177 := z.EncBinary()
+ _ = yym177
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SystemCgroups))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[53] {
+ yym179 := z.EncBinary()
+ _ = yym179
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[53] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cgroupRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym180 := z.EncBinary()
+ _ = yym180
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym182 := z.EncBinary()
+ _ = yym182
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerRuntime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym183 := z.EncBinary()
+ _ = yym183
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[55] {
+ yy185 := &x.RuntimeRequestTimeout
+ yym186 := z.EncBinary()
+ _ = yym186
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy185) {
+ } else if !yym186 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy185)
+ } else {
+ z.EncFallback(yy185)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[55] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runtimeRequestTimeout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy187 := &x.RuntimeRequestTimeout
+ yym188 := z.EncBinary()
+ _ = yym188
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy187) {
+ } else if !yym188 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy187)
+ } else {
+ z.EncFallback(yy187)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[56] {
+ yym190 := z.EncBinary()
+ _ = yym190
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RktPath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[56] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rktPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym191 := z.EncBinary()
+ _ = yym191
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RktPath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[57] {
+ yym193 := z.EncBinary()
+ _ = yym193
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RktAPIEndpoint))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[57] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rktAPIEndpoint"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym194 := z.EncBinary()
+ _ = yym194
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RktAPIEndpoint))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[58] {
+ yym196 := z.EncBinary()
+ _ = yym196
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[58] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rktStage1Image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym197 := z.EncBinary()
+ _ = yym197
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym199 := z.EncBinary()
+ _ = yym199
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lockFilePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym200 := z.EncBinary()
+ _ = yym200
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym202 := z.EncBinary()
+ _ = yym202
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ExitOnLockContention))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exitOnLockContention"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym203 := z.EncBinary()
+ _ = yym203
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ExitOnLockContention))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym205 := z.EncBinary()
+ _ = yym205
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ConfigureCBR0))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configureCbr0"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym206 := z.EncBinary()
+ _ = yym206
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ConfigureCBR0))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym208 := z.EncBinary()
+ _ = yym208
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HairpinMode))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hairpinMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym209 := z.EncBinary()
+ _ = yym209
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HairpinMode))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym211 := z.EncBinary()
+ _ = yym211
+ if false {
+ } else {
+ r.EncodeBool(bool(x.BabysitDaemons))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("babysitDaemons"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym212 := z.EncBinary()
+ _ = yym212
+ if false {
+ } else {
+ r.EncodeBool(bool(x.BabysitDaemons))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym214 := z.EncBinary()
+ _ = yym214
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym215 := z.EncBinary()
+ _ = yym215
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxPods))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym217 := z.EncBinary()
+ _ = yym217
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NvidiaGPUs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nvidiaGPUs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym218 := z.EncBinary()
+ _ = yym218
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NvidiaGPUs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym220 := z.EncBinary()
+ _ = yym220
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("dockerExecHandlerName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym221 := z.EncBinary()
+ _ = yym221
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym223 := z.EncBinary()
+ _ = yym223
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym224 := z.EncBinary()
+ _ = yym224
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym226 := z.EncBinary()
+ _ = yym226
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resolvConf"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym227 := z.EncBinary()
+ _ = yym227
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym229 := z.EncBinary()
+ _ = yym229
+ if false {
+ } else {
+ r.EncodeBool(bool(x.CPUCFSQuota))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cpuCFSQuota"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym230 := z.EncBinary()
+ _ = yym230
+ if false {
+ } else {
+ r.EncodeBool(bool(x.CPUCFSQuota))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym232 := z.EncBinary()
+ _ = yym232
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Containerized))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerized"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym233 := z.EncBinary()
+ _ = yym233
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Containerized))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym235 := z.EncBinary()
+ _ = yym235
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.MaxOpenFiles))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxOpenFiles"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym236 := z.EncBinary()
+ _ = yym236
+ if false {
+ } else {
+ r.EncodeUint(uint64(x.MaxOpenFiles))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym238 := z.EncBinary()
+ _ = yym238
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReconcileCIDR))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reconcileCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym239 := z.EncBinary()
+ _ = yym239
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReconcileCIDR))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym241 := z.EncBinary()
+ _ = yym241
+ if false {
+ } else {
+ r.EncodeBool(bool(x.RegisterSchedulable))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registerSchedulable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym242 := z.EncBinary()
+ _ = yym242
+ if false {
+ } else {
+ r.EncodeBool(bool(x.RegisterSchedulable))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym244 := z.EncBinary()
+ _ = yym244
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("contentType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym245 := z.EncBinary()
+ _ = yym245
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym247 := z.EncBinary()
+ _ = yym247
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.KubeAPIQPS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym248 := z.EncBinary()
+ _ = yym248
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.KubeAPIQPS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym250 := z.EncBinary()
+ _ = yym250
+ if false {
+ } else {
+ r.EncodeInt(int64(x.KubeAPIBurst))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym251 := z.EncBinary()
+ _ = yym251
+ if false {
+ } else {
+ r.EncodeInt(int64(x.KubeAPIBurst))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym253 := z.EncBinary()
+ _ = yym253
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SerializeImagePulls))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serializeImagePulls"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym254 := z.EncBinary()
+ _ = yym254
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SerializeImagePulls))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym256 := z.EncBinary()
+ _ = yym256
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ExperimentalFlannelOverlay))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("experimentalFlannelOverlay"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym257 := z.EncBinary()
+ _ = yym257
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ExperimentalFlannelOverlay))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[79] {
+ yy259 := &x.OutOfDiskTransitionFrequency
+ yym260 := z.EncBinary()
+ _ = yym260
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy259) {
+ } else if !yym260 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy259)
+ } else {
+ z.EncFallback(yy259)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[79] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("outOfDiskTransitionFrequency"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy261 := &x.OutOfDiskTransitionFrequency
+ yym262 := z.EncBinary()
+ _ = yym262
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy261) {
+ } else if !yym262 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy261)
+ } else {
+ z.EncFallback(yy261)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[80] {
+ yym264 := z.EncBinary()
+ _ = yym264
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[80] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym265 := z.EncBinary()
+ _ = yym265
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.NodeLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym267 := z.EncBinary()
+ _ = yym267
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeLabels, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeLabels"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym268 := z.EncBinary()
+ _ = yym268
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeLabels, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym270 := z.EncBinary()
+ _ = yym270
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonMasqueradeCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym271 := z.EncBinary()
+ _ = yym271
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym273 := z.EncBinary()
+ _ = yym273
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableCustomMetrics))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableCustomMetrics"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym274 := z.EncBinary()
+ _ = yym274
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableCustomMetrics))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[84] {
+ yym276 := z.EncBinary()
+ _ = yym276
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[84] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionHard"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym277 := z.EncBinary()
+ _ = yym277
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[85] {
+ yym279 := z.EncBinary()
+ _ = yym279
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[85] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionSoft"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym280 := z.EncBinary()
+ _ = yym280
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[86] {
+ yym282 := z.EncBinary()
+ _ = yym282
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[86] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionSoftGracePeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym283 := z.EncBinary()
+ _ = yym283
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[87] {
+ yy285 := &x.EvictionPressureTransitionPeriod
+ yym286 := z.EncBinary()
+ _ = yym286
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy285) {
+ } else if !yym286 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy285)
+ } else {
+ z.EncFallback(yy285)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[87] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionPressureTransitionPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy287 := &x.EvictionPressureTransitionPeriod
+ yym288 := z.EncBinary()
+ _ = yym288
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy287) {
+ } else if !yym288 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy287)
+ } else {
+ z.EncFallback(yy287)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[88] {
+ yym290 := z.EncBinary()
+ _ = yym290
+ if false {
+ } else {
+ r.EncodeInt(int64(x.EvictionMaxPodGracePeriod))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[88] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionMaxPodGracePeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym291 := z.EncBinary()
+ _ = yym291
+ if false {
+ } else {
+ r.EncodeInt(int64(x.EvictionMaxPodGracePeriod))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym293 := z.EncBinary()
+ _ = yym293
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PodsPerCore))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podsPerCore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym294 := z.EncBinary()
+ _ = yym294
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PodsPerCore))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym296 := z.EncBinary()
+ _ = yym296
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableControllerAttachDetach))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableControllerAttachDetach"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym297 := z.EncBinary()
+ _ = yym297
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableControllerAttachDetach))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "config":
+ if r.TryDecodeAsNil() {
+ x.Config = ""
+ } else {
+ x.Config = string(r.DecodeString())
+ }
+ case "syncFrequency":
+ if r.TryDecodeAsNil() {
+ x.SyncFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv5 := &x.SyncFrequency
+ 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)
+ }
+ }
+ case "fileCheckFrequency":
+ if r.TryDecodeAsNil() {
+ x.FileCheckFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv7 := &x.FileCheckFrequency
+ 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)
+ }
+ }
+ case "httpCheckFrequency":
+ if r.TryDecodeAsNil() {
+ x.HTTPCheckFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv9 := &x.HTTPCheckFrequency
+ 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 "manifestURL":
+ if r.TryDecodeAsNil() {
+ x.ManifestURL = ""
+ } else {
+ x.ManifestURL = string(r.DecodeString())
+ }
+ case "manifestURLHeader":
+ if r.TryDecodeAsNil() {
+ x.ManifestURLHeader = ""
+ } else {
+ x.ManifestURLHeader = string(r.DecodeString())
+ }
+ case "enableServer":
+ if r.TryDecodeAsNil() {
+ x.EnableServer = false
+ } else {
+ x.EnableServer = bool(r.DecodeBool())
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(r.DecodeString())
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = uint(r.DecodeUint(codecSelferBitsize1234))
+ }
+ case "readOnlyPort":
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyPort = 0
+ } else {
+ x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234))
+ }
+ case "tLSCertFile":
+ if r.TryDecodeAsNil() {
+ x.TLSCertFile = ""
+ } else {
+ x.TLSCertFile = string(r.DecodeString())
+ }
+ case "tLSPrivateKeyFile":
+ if r.TryDecodeAsNil() {
+ x.TLSPrivateKeyFile = ""
+ } else {
+ x.TLSPrivateKeyFile = string(r.DecodeString())
+ }
+ case "certDirectory":
+ if r.TryDecodeAsNil() {
+ x.CertDirectory = ""
+ } else {
+ x.CertDirectory = string(r.DecodeString())
+ }
+ case "hostnameOverride":
+ if r.TryDecodeAsNil() {
+ x.HostnameOverride = ""
+ } else {
+ x.HostnameOverride = string(r.DecodeString())
+ }
+ case "podInfraContainerImage":
+ if r.TryDecodeAsNil() {
+ x.PodInfraContainerImage = ""
+ } else {
+ x.PodInfraContainerImage = string(r.DecodeString())
+ }
+ case "dockerEndpoint":
+ if r.TryDecodeAsNil() {
+ x.DockerEndpoint = ""
+ } else {
+ x.DockerEndpoint = string(r.DecodeString())
+ }
+ case "rootDirectory":
+ if r.TryDecodeAsNil() {
+ x.RootDirectory = ""
+ } else {
+ x.RootDirectory = string(r.DecodeString())
+ }
+ case "seccompProfileRoot":
+ if r.TryDecodeAsNil() {
+ x.SeccompProfileRoot = ""
+ } else {
+ x.SeccompProfileRoot = string(r.DecodeString())
+ }
+ case "allowPrivileged":
+ if r.TryDecodeAsNil() {
+ x.AllowPrivileged = false
+ } else {
+ x.AllowPrivileged = bool(r.DecodeBool())
+ }
+ case "hostNetworkSources":
+ if r.TryDecodeAsNil() {
+ x.HostNetworkSources = ""
+ } else {
+ x.HostNetworkSources = string(r.DecodeString())
+ }
+ case "hostPIDSources":
+ if r.TryDecodeAsNil() {
+ x.HostPIDSources = ""
+ } else {
+ x.HostPIDSources = string(r.DecodeString())
+ }
+ case "hostIPCSources":
+ if r.TryDecodeAsNil() {
+ x.HostIPCSources = ""
+ } else {
+ x.HostIPCSources = string(r.DecodeString())
+ }
+ case "registryPullQPS":
+ if r.TryDecodeAsNil() {
+ x.RegistryPullQPS = 0
+ } else {
+ x.RegistryPullQPS = float64(r.DecodeFloat(false))
+ }
+ case "registryBurst":
+ if r.TryDecodeAsNil() {
+ x.RegistryBurst = 0
+ } else {
+ x.RegistryBurst = int32(r.DecodeInt(32))
+ }
+ case "eventRecordQPS":
+ if r.TryDecodeAsNil() {
+ x.EventRecordQPS = 0
+ } else {
+ x.EventRecordQPS = float32(r.DecodeFloat(true))
+ }
+ case "eventBurst":
+ if r.TryDecodeAsNil() {
+ x.EventBurst = 0
+ } else {
+ x.EventBurst = int32(r.DecodeInt(32))
+ }
+ case "enableDebuggingHandlers":
+ if r.TryDecodeAsNil() {
+ x.EnableDebuggingHandlers = false
+ } else {
+ x.EnableDebuggingHandlers = bool(r.DecodeBool())
+ }
+ case "minimumGCAge":
+ if r.TryDecodeAsNil() {
+ x.MinimumGCAge = pkg1_unversioned.Duration{}
+ } else {
+ yyv34 := &x.MinimumGCAge
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv34) {
+ } else if !yym35 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv34)
+ } else {
+ z.DecFallback(yyv34, false)
+ }
+ }
+ case "maxPerPodContainerCount":
+ if r.TryDecodeAsNil() {
+ x.MaxPerPodContainerCount = 0
+ } else {
+ x.MaxPerPodContainerCount = int32(r.DecodeInt(32))
+ }
+ case "maxContainerCount":
+ if r.TryDecodeAsNil() {
+ x.MaxContainerCount = 0
+ } else {
+ x.MaxContainerCount = int32(r.DecodeInt(32))
+ }
+ case "cAdvisorPort":
+ if r.TryDecodeAsNil() {
+ x.CAdvisorPort = 0
+ } else {
+ x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234))
+ }
+ case "healthzPort":
+ if r.TryDecodeAsNil() {
+ x.HealthzPort = 0
+ } else {
+ x.HealthzPort = int32(r.DecodeInt(32))
+ }
+ case "healthzBindAddress":
+ if r.TryDecodeAsNil() {
+ x.HealthzBindAddress = ""
+ } else {
+ x.HealthzBindAddress = string(r.DecodeString())
+ }
+ case "oomScoreAdj":
+ if r.TryDecodeAsNil() {
+ x.OOMScoreAdj = 0
+ } else {
+ x.OOMScoreAdj = int32(r.DecodeInt(32))
+ }
+ case "registerNode":
+ if r.TryDecodeAsNil() {
+ x.RegisterNode = false
+ } else {
+ x.RegisterNode = bool(r.DecodeBool())
+ }
+ case "clusterDomain":
+ if r.TryDecodeAsNil() {
+ x.ClusterDomain = ""
+ } else {
+ x.ClusterDomain = string(r.DecodeString())
+ }
+ case "masterServiceNamespace":
+ if r.TryDecodeAsNil() {
+ x.MasterServiceNamespace = ""
+ } else {
+ x.MasterServiceNamespace = string(r.DecodeString())
+ }
+ case "clusterDNS":
+ if r.TryDecodeAsNil() {
+ x.ClusterDNS = ""
+ } else {
+ x.ClusterDNS = string(r.DecodeString())
+ }
+ case "streamingConnectionIdleTimeout":
+ if r.TryDecodeAsNil() {
+ x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv46 := &x.StreamingConnectionIdleTimeout
+ yym47 := z.DecBinary()
+ _ = yym47
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv46) {
+ } else if !yym47 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv46)
+ } else {
+ z.DecFallback(yyv46, false)
+ }
+ }
+ case "nodeStatusUpdateFrequency":
+ if r.TryDecodeAsNil() {
+ x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv48 := &x.NodeStatusUpdateFrequency
+ yym49 := z.DecBinary()
+ _ = yym49
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv48) {
+ } else if !yym49 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv48)
+ } else {
+ z.DecFallback(yyv48, false)
+ }
+ }
+ case "imageMinimumGCAge":
+ if r.TryDecodeAsNil() {
+ x.ImageMinimumGCAge = pkg1_unversioned.Duration{}
+ } else {
+ yyv50 := &x.ImageMinimumGCAge
+ yym51 := z.DecBinary()
+ _ = yym51
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv50) {
+ } else if !yym51 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv50)
+ } else {
+ z.DecFallback(yyv50, false)
+ }
+ }
+ case "imageGCHighThresholdPercent":
+ if r.TryDecodeAsNil() {
+ x.ImageGCHighThresholdPercent = 0
+ } else {
+ x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32))
+ }
+ case "imageGCLowThresholdPercent":
+ if r.TryDecodeAsNil() {
+ x.ImageGCLowThresholdPercent = 0
+ } else {
+ x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32))
+ }
+ case "lowDiskSpaceThresholdMB":
+ if r.TryDecodeAsNil() {
+ x.LowDiskSpaceThresholdMB = 0
+ } else {
+ x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32))
+ }
+ case "volumeStatsAggPeriod":
+ if r.TryDecodeAsNil() {
+ x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv55 := &x.VolumeStatsAggPeriod
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv55) {
+ } else if !yym56 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv55)
+ } else {
+ z.DecFallback(yyv55, false)
+ }
+ }
+ case "networkPluginName":
+ if r.TryDecodeAsNil() {
+ x.NetworkPluginName = ""
+ } else {
+ x.NetworkPluginName = string(r.DecodeString())
+ }
+ case "networkPluginDir":
+ if r.TryDecodeAsNil() {
+ x.NetworkPluginDir = ""
+ } else {
+ x.NetworkPluginDir = string(r.DecodeString())
+ }
+ case "volumePluginDir":
+ if r.TryDecodeAsNil() {
+ x.VolumePluginDir = ""
+ } else {
+ x.VolumePluginDir = string(r.DecodeString())
+ }
+ case "cloudProvider":
+ if r.TryDecodeAsNil() {
+ x.CloudProvider = ""
+ } else {
+ x.CloudProvider = string(r.DecodeString())
+ }
+ case "cloudConfigFile":
+ if r.TryDecodeAsNil() {
+ x.CloudConfigFile = ""
+ } else {
+ x.CloudConfigFile = string(r.DecodeString())
+ }
+ case "kubeletCgroups":
+ if r.TryDecodeAsNil() {
+ x.KubeletCgroups = ""
+ } else {
+ x.KubeletCgroups = string(r.DecodeString())
+ }
+ case "runtimeCgroups":
+ if r.TryDecodeAsNil() {
+ x.RuntimeCgroups = ""
+ } else {
+ x.RuntimeCgroups = string(r.DecodeString())
+ }
+ case "systemContainer":
+ if r.TryDecodeAsNil() {
+ x.SystemCgroups = ""
+ } else {
+ x.SystemCgroups = string(r.DecodeString())
+ }
+ case "cgroupRoot":
+ if r.TryDecodeAsNil() {
+ x.CgroupRoot = ""
+ } else {
+ x.CgroupRoot = string(r.DecodeString())
+ }
+ case "containerRuntime":
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntime = ""
+ } else {
+ x.ContainerRuntime = string(r.DecodeString())
+ }
+ case "runtimeRequestTimeout":
+ if r.TryDecodeAsNil() {
+ x.RuntimeRequestTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv67 := &x.RuntimeRequestTimeout
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv67) {
+ } else if !yym68 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv67)
+ } else {
+ z.DecFallback(yyv67, false)
+ }
+ }
+ case "rktPath":
+ if r.TryDecodeAsNil() {
+ x.RktPath = ""
+ } else {
+ x.RktPath = string(r.DecodeString())
+ }
+ case "rktAPIEndpoint":
+ if r.TryDecodeAsNil() {
+ x.RktAPIEndpoint = ""
+ } else {
+ x.RktAPIEndpoint = string(r.DecodeString())
+ }
+ case "rktStage1Image":
+ if r.TryDecodeAsNil() {
+ x.RktStage1Image = ""
+ } else {
+ x.RktStage1Image = string(r.DecodeString())
+ }
+ case "lockFilePath":
+ if r.TryDecodeAsNil() {
+ x.LockFilePath = ""
+ } else {
+ x.LockFilePath = string(r.DecodeString())
+ }
+ case "exitOnLockContention":
+ if r.TryDecodeAsNil() {
+ x.ExitOnLockContention = false
+ } else {
+ x.ExitOnLockContention = bool(r.DecodeBool())
+ }
+ case "configureCbr0":
+ if r.TryDecodeAsNil() {
+ x.ConfigureCBR0 = false
+ } else {
+ x.ConfigureCBR0 = bool(r.DecodeBool())
+ }
+ case "hairpinMode":
+ if r.TryDecodeAsNil() {
+ x.HairpinMode = ""
+ } else {
+ x.HairpinMode = string(r.DecodeString())
+ }
+ case "babysitDaemons":
+ if r.TryDecodeAsNil() {
+ x.BabysitDaemons = false
+ } else {
+ x.BabysitDaemons = bool(r.DecodeBool())
+ }
+ case "maxPods":
+ if r.TryDecodeAsNil() {
+ x.MaxPods = 0
+ } else {
+ x.MaxPods = int32(r.DecodeInt(32))
+ }
+ case "nvidiaGPUs":
+ if r.TryDecodeAsNil() {
+ x.NvidiaGPUs = 0
+ } else {
+ x.NvidiaGPUs = int32(r.DecodeInt(32))
+ }
+ case "dockerExecHandlerName":
+ if r.TryDecodeAsNil() {
+ x.DockerExecHandlerName = ""
+ } else {
+ x.DockerExecHandlerName = string(r.DecodeString())
+ }
+ case "podCIDR":
+ if r.TryDecodeAsNil() {
+ x.PodCIDR = ""
+ } else {
+ x.PodCIDR = string(r.DecodeString())
+ }
+ case "resolvConf":
+ if r.TryDecodeAsNil() {
+ x.ResolverConfig = ""
+ } else {
+ x.ResolverConfig = string(r.DecodeString())
+ }
+ case "cpuCFSQuota":
+ if r.TryDecodeAsNil() {
+ x.CPUCFSQuota = false
+ } else {
+ x.CPUCFSQuota = bool(r.DecodeBool())
+ }
+ case "containerized":
+ if r.TryDecodeAsNil() {
+ x.Containerized = false
+ } else {
+ x.Containerized = bool(r.DecodeBool())
+ }
+ case "maxOpenFiles":
+ if r.TryDecodeAsNil() {
+ x.MaxOpenFiles = 0
+ } else {
+ x.MaxOpenFiles = uint64(r.DecodeUint(64))
+ }
+ case "reconcileCIDR":
+ if r.TryDecodeAsNil() {
+ x.ReconcileCIDR = false
+ } else {
+ x.ReconcileCIDR = bool(r.DecodeBool())
+ }
+ case "registerSchedulable":
+ if r.TryDecodeAsNil() {
+ x.RegisterSchedulable = false
+ } else {
+ x.RegisterSchedulable = bool(r.DecodeBool())
+ }
+ case "contentType":
+ if r.TryDecodeAsNil() {
+ x.ContentType = ""
+ } else {
+ x.ContentType = string(r.DecodeString())
+ }
+ case "kubeAPIQPS":
+ if r.TryDecodeAsNil() {
+ x.KubeAPIQPS = 0
+ } else {
+ x.KubeAPIQPS = float32(r.DecodeFloat(true))
+ }
+ case "kubeAPIBurst":
+ if r.TryDecodeAsNil() {
+ x.KubeAPIBurst = 0
+ } else {
+ x.KubeAPIBurst = int32(r.DecodeInt(32))
+ }
+ case "serializeImagePulls":
+ if r.TryDecodeAsNil() {
+ x.SerializeImagePulls = false
+ } else {
+ x.SerializeImagePulls = bool(r.DecodeBool())
+ }
+ case "experimentalFlannelOverlay":
+ if r.TryDecodeAsNil() {
+ x.ExperimentalFlannelOverlay = false
+ } else {
+ x.ExperimentalFlannelOverlay = bool(r.DecodeBool())
+ }
+ case "outOfDiskTransitionFrequency":
+ if r.TryDecodeAsNil() {
+ x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv92 := &x.OutOfDiskTransitionFrequency
+ yym93 := z.DecBinary()
+ _ = yym93
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv92) {
+ } else if !yym93 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv92)
+ } else {
+ z.DecFallback(yyv92, false)
+ }
+ }
+ case "nodeIP":
+ if r.TryDecodeAsNil() {
+ x.NodeIP = ""
+ } else {
+ x.NodeIP = string(r.DecodeString())
+ }
+ case "nodeLabels":
+ if r.TryDecodeAsNil() {
+ x.NodeLabels = nil
+ } else {
+ yyv95 := &x.NodeLabels
+ yym96 := z.DecBinary()
+ _ = yym96
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv95, false, d)
+ }
+ }
+ case "nonMasqueradeCIDR":
+ if r.TryDecodeAsNil() {
+ x.NonMasqueradeCIDR = ""
+ } else {
+ x.NonMasqueradeCIDR = string(r.DecodeString())
+ }
+ case "enableCustomMetrics":
+ if r.TryDecodeAsNil() {
+ x.EnableCustomMetrics = false
+ } else {
+ x.EnableCustomMetrics = bool(r.DecodeBool())
+ }
+ case "evictionHard":
+ if r.TryDecodeAsNil() {
+ x.EvictionHard = ""
+ } else {
+ x.EvictionHard = string(r.DecodeString())
+ }
+ case "evictionSoft":
+ if r.TryDecodeAsNil() {
+ x.EvictionSoft = ""
+ } else {
+ x.EvictionSoft = string(r.DecodeString())
+ }
+ case "evictionSoftGracePeriod":
+ if r.TryDecodeAsNil() {
+ x.EvictionSoftGracePeriod = ""
+ } else {
+ x.EvictionSoftGracePeriod = string(r.DecodeString())
+ }
+ case "evictionPressureTransitionPeriod":
+ if r.TryDecodeAsNil() {
+ x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv102 := &x.EvictionPressureTransitionPeriod
+ yym103 := z.DecBinary()
+ _ = yym103
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv102) {
+ } else if !yym103 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv102)
+ } else {
+ z.DecFallback(yyv102, false)
+ }
+ }
+ case "evictionMaxPodGracePeriod":
+ if r.TryDecodeAsNil() {
+ x.EvictionMaxPodGracePeriod = 0
+ } else {
+ x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32))
+ }
+ case "podsPerCore":
+ if r.TryDecodeAsNil() {
+ x.PodsPerCore = 0
+ } else {
+ x.PodsPerCore = int32(r.DecodeInt(32))
+ }
+ case "enableControllerAttachDetach":
+ if r.TryDecodeAsNil() {
+ x.EnableControllerAttachDetach = false
+ } else {
+ x.EnableControllerAttachDetach = bool(r.DecodeBool())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj107 int
+ var yyb107 bool
+ var yyhl107 bool = l >= 0
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Config = ""
+ } else {
+ x.Config = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SyncFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv109 := &x.SyncFrequency
+ yym110 := z.DecBinary()
+ _ = yym110
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv109) {
+ } else if !yym110 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv109)
+ } else {
+ z.DecFallback(yyv109, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FileCheckFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv111 := &x.FileCheckFrequency
+ yym112 := z.DecBinary()
+ _ = yym112
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv111) {
+ } else if !yym112 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv111)
+ } else {
+ z.DecFallback(yyv111, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HTTPCheckFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv113 := &x.HTTPCheckFrequency
+ yym114 := z.DecBinary()
+ _ = yym114
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv113) {
+ } else if !yym114 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv113)
+ } else {
+ z.DecFallback(yyv113, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ManifestURL = ""
+ } else {
+ x.ManifestURL = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ManifestURLHeader = ""
+ } else {
+ x.ManifestURLHeader = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnableServer = false
+ } else {
+ x.EnableServer = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = uint(r.DecodeUint(codecSelferBitsize1234))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyPort = 0
+ } else {
+ x.ReadOnlyPort = uint(r.DecodeUint(codecSelferBitsize1234))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TLSCertFile = ""
+ } else {
+ x.TLSCertFile = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TLSPrivateKeyFile = ""
+ } else {
+ x.TLSPrivateKeyFile = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CertDirectory = ""
+ } else {
+ x.CertDirectory = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostnameOverride = ""
+ } else {
+ x.HostnameOverride = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodInfraContainerImage = ""
+ } else {
+ x.PodInfraContainerImage = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DockerEndpoint = ""
+ } else {
+ x.DockerEndpoint = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RootDirectory = ""
+ } else {
+ x.RootDirectory = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SeccompProfileRoot = ""
+ } else {
+ x.SeccompProfileRoot = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AllowPrivileged = false
+ } else {
+ x.AllowPrivileged = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostNetworkSources = ""
+ } else {
+ x.HostNetworkSources = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPIDSources = ""
+ } else {
+ x.HostPIDSources = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIPCSources = ""
+ } else {
+ x.HostIPCSources = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RegistryPullQPS = 0
+ } else {
+ x.RegistryPullQPS = float64(r.DecodeFloat(false))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RegistryBurst = 0
+ } else {
+ x.RegistryBurst = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EventRecordQPS = 0
+ } else {
+ x.EventRecordQPS = float32(r.DecodeFloat(true))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EventBurst = 0
+ } else {
+ x.EventBurst = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnableDebuggingHandlers = false
+ } else {
+ x.EnableDebuggingHandlers = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinimumGCAge = pkg1_unversioned.Duration{}
+ } else {
+ yyv138 := &x.MinimumGCAge
+ yym139 := z.DecBinary()
+ _ = yym139
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv138) {
+ } else if !yym139 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv138)
+ } else {
+ z.DecFallback(yyv138, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxPerPodContainerCount = 0
+ } else {
+ x.MaxPerPodContainerCount = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxContainerCount = 0
+ } else {
+ x.MaxContainerCount = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CAdvisorPort = 0
+ } else {
+ x.CAdvisorPort = uint(r.DecodeUint(codecSelferBitsize1234))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HealthzPort = 0
+ } else {
+ x.HealthzPort = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HealthzBindAddress = ""
+ } else {
+ x.HealthzBindAddress = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OOMScoreAdj = 0
+ } else {
+ x.OOMScoreAdj = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RegisterNode = false
+ } else {
+ x.RegisterNode = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterDomain = ""
+ } else {
+ x.ClusterDomain = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MasterServiceNamespace = ""
+ } else {
+ x.MasterServiceNamespace = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterDNS = ""
+ } else {
+ x.ClusterDNS = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv150 := &x.StreamingConnectionIdleTimeout
+ yym151 := z.DecBinary()
+ _ = yym151
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv150) {
+ } else if !yym151 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv150)
+ } else {
+ z.DecFallback(yyv150, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv152 := &x.NodeStatusUpdateFrequency
+ yym153 := z.DecBinary()
+ _ = yym153
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv152) {
+ } else if !yym153 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv152)
+ } else {
+ z.DecFallback(yyv152, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageMinimumGCAge = pkg1_unversioned.Duration{}
+ } else {
+ yyv154 := &x.ImageMinimumGCAge
+ yym155 := z.DecBinary()
+ _ = yym155
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv154) {
+ } else if !yym155 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv154)
+ } else {
+ z.DecFallback(yyv154, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageGCHighThresholdPercent = 0
+ } else {
+ x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageGCLowThresholdPercent = 0
+ } else {
+ x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LowDiskSpaceThresholdMB = 0
+ } else {
+ x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv159 := &x.VolumeStatsAggPeriod
+ yym160 := z.DecBinary()
+ _ = yym160
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv159) {
+ } else if !yym160 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv159)
+ } else {
+ z.DecFallback(yyv159, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NetworkPluginName = ""
+ } else {
+ x.NetworkPluginName = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NetworkPluginDir = ""
+ } else {
+ x.NetworkPluginDir = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumePluginDir = ""
+ } else {
+ x.VolumePluginDir = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CloudProvider = ""
+ } else {
+ x.CloudProvider = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CloudConfigFile = ""
+ } else {
+ x.CloudConfigFile = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeletCgroups = ""
+ } else {
+ x.KubeletCgroups = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RuntimeCgroups = ""
+ } else {
+ x.RuntimeCgroups = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SystemCgroups = ""
+ } else {
+ x.SystemCgroups = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CgroupRoot = ""
+ } else {
+ x.CgroupRoot = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntime = ""
+ } else {
+ x.ContainerRuntime = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RuntimeRequestTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv171 := &x.RuntimeRequestTimeout
+ yym172 := z.DecBinary()
+ _ = yym172
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv171) {
+ } else if !yym172 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv171)
+ } else {
+ z.DecFallback(yyv171, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RktPath = ""
+ } else {
+ x.RktPath = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RktAPIEndpoint = ""
+ } else {
+ x.RktAPIEndpoint = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RktStage1Image = ""
+ } else {
+ x.RktStage1Image = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LockFilePath = ""
+ } else {
+ x.LockFilePath = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExitOnLockContention = false
+ } else {
+ x.ExitOnLockContention = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConfigureCBR0 = false
+ } else {
+ x.ConfigureCBR0 = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HairpinMode = ""
+ } else {
+ x.HairpinMode = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.BabysitDaemons = false
+ } else {
+ x.BabysitDaemons = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxPods = 0
+ } else {
+ x.MaxPods = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NvidiaGPUs = 0
+ } else {
+ x.NvidiaGPUs = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DockerExecHandlerName = ""
+ } else {
+ x.DockerExecHandlerName = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodCIDR = ""
+ } else {
+ x.PodCIDR = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResolverConfig = ""
+ } else {
+ x.ResolverConfig = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CPUCFSQuota = false
+ } else {
+ x.CPUCFSQuota = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Containerized = false
+ } else {
+ x.Containerized = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxOpenFiles = 0
+ } else {
+ x.MaxOpenFiles = uint64(r.DecodeUint(64))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReconcileCIDR = false
+ } else {
+ x.ReconcileCIDR = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RegisterSchedulable = false
+ } else {
+ x.RegisterSchedulable = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContentType = ""
+ } else {
+ x.ContentType = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeAPIQPS = 0
+ } else {
+ x.KubeAPIQPS = float32(r.DecodeFloat(true))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeAPIBurst = 0
+ } else {
+ x.KubeAPIBurst = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SerializeImagePulls = false
+ } else {
+ x.SerializeImagePulls = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExperimentalFlannelOverlay = false
+ } else {
+ x.ExperimentalFlannelOverlay = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{}
+ } else {
+ yyv196 := &x.OutOfDiskTransitionFrequency
+ yym197 := z.DecBinary()
+ _ = yym197
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv196) {
+ } else if !yym197 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv196)
+ } else {
+ z.DecFallback(yyv196, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeIP = ""
+ } else {
+ x.NodeIP = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeLabels = nil
+ } else {
+ yyv199 := &x.NodeLabels
+ yym200 := z.DecBinary()
+ _ = yym200
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv199, false, d)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NonMasqueradeCIDR = ""
+ } else {
+ x.NonMasqueradeCIDR = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnableCustomMetrics = false
+ } else {
+ x.EnableCustomMetrics = bool(r.DecodeBool())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionHard = ""
+ } else {
+ x.EvictionHard = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionSoft = ""
+ } else {
+ x.EvictionSoft = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionSoftGracePeriod = ""
+ } else {
+ x.EvictionSoftGracePeriod = string(r.DecodeString())
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv206 := &x.EvictionPressureTransitionPeriod
+ yym207 := z.DecBinary()
+ _ = yym207
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv206) {
+ } else if !yym207 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv206)
+ } else {
+ z.DecFallback(yyv206, false)
+ }
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionMaxPodGracePeriod = 0
+ } else {
+ x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodsPerCore = 0
+ } else {
+ x.PodsPerCore = int32(r.DecodeInt(32))
+ }
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnableControllerAttachDetach = false
+ } else {
+ x.EnableControllerAttachDetach = bool(r.DecodeBool())
+ }
+ for {
+ yyj107++
+ if yyhl107 {
+ yyb107 = yyj107 > l
+ } else {
+ yyb107 = r.CheckBreak()
+ }
+ if yyb107 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj107-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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[12] = x.Kind != ""
+ yyq2[13] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ yynn2 = 12
+ 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_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_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableProfiling))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableProfiling"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableProfiling))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("contentType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.KubeAPIQPS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.KubeAPIQPS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(x.KubeAPIBurst))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(x.KubeAPIBurst))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("schedulerName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hardPodAffinitySymmetricWeight"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failureDomains"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy37 := &x.LeaderElection
+ yy37.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("leaderElection"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy39 := &x.LeaderElection
+ yy39.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(r.DecodeString())
+ }
+ case "algorithmProvider":
+ if r.TryDecodeAsNil() {
+ x.AlgorithmProvider = ""
+ } else {
+ x.AlgorithmProvider = string(r.DecodeString())
+ }
+ case "policyConfigFile":
+ if r.TryDecodeAsNil() {
+ x.PolicyConfigFile = ""
+ } else {
+ x.PolicyConfigFile = string(r.DecodeString())
+ }
+ case "enableProfiling":
+ if r.TryDecodeAsNil() {
+ x.EnableProfiling = false
+ } else {
+ x.EnableProfiling = bool(r.DecodeBool())
+ }
+ case "contentType":
+ if r.TryDecodeAsNil() {
+ x.ContentType = ""
+ } else {
+ x.ContentType = string(r.DecodeString())
+ }
+ case "kubeAPIQPS":
+ if r.TryDecodeAsNil() {
+ x.KubeAPIQPS = 0
+ } else {
+ x.KubeAPIQPS = float32(r.DecodeFloat(true))
+ }
+ case "kubeAPIBurst":
+ if r.TryDecodeAsNil() {
+ x.KubeAPIBurst = 0
+ } else {
+ x.KubeAPIBurst = int32(r.DecodeInt(32))
+ }
+ case "schedulerName":
+ if r.TryDecodeAsNil() {
+ x.SchedulerName = ""
+ } else {
+ x.SchedulerName = string(r.DecodeString())
+ }
+ case "hardPodAffinitySymmetricWeight":
+ if r.TryDecodeAsNil() {
+ x.HardPodAffinitySymmetricWeight = 0
+ } else {
+ x.HardPodAffinitySymmetricWeight = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ case "failureDomains":
+ if r.TryDecodeAsNil() {
+ x.FailureDomains = ""
+ } else {
+ x.FailureDomains = string(r.DecodeString())
+ }
+ case "leaderElection":
+ if r.TryDecodeAsNil() {
+ x.LeaderElection = LeaderElectionConfiguration{}
+ } else {
+ yyv15 := &x.LeaderElection
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *KubeSchedulerConfiguration) 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.Port = 0
+ } else {
+ x.Port = 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.Address = ""
+ } else {
+ x.Address = string(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.AlgorithmProvider = ""
+ } else {
+ x.AlgorithmProvider = string(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.PolicyConfigFile = ""
+ } else {
+ x.PolicyConfigFile = string(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.EnableProfiling = false
+ } else {
+ x.EnableProfiling = bool(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.ContentType = ""
+ } else {
+ x.ContentType = string(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.KubeAPIQPS = 0
+ } else {
+ x.KubeAPIQPS = float32(r.DecodeFloat(true))
+ }
+ 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.KubeAPIBurst = 0
+ } else {
+ x.KubeAPIBurst = 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.SchedulerName = ""
+ } else {
+ x.SchedulerName = string(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.HardPodAffinitySymmetricWeight = 0
+ } else {
+ x.HardPodAffinitySymmetricWeight = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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.FailureDomains = ""
+ } else {
+ x.FailureDomains = string(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.LeaderElection = LeaderElectionConfiguration{}
+ } else {
+ yyv30 := &x.LeaderElection
+ yyv30.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } 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.EncodeBool(bool(x.LeaderElect))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("leaderElect"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.LeaderElect))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.LeaseDuration
+ 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("leaseDuration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.LeaseDuration
+ 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)
+ yy12 := &x.RenewDeadline
+ 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("renewDeadline"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.RenewDeadline
+ 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_containerArrayElem1234)
+ yy17 := &x.RetryPeriod
+ 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)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("retryPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy19 := &x.RetryPeriod
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy19) {
+ } else if !yym20 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy19)
+ } else {
+ z.EncFallback(yy19)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "leaderElect":
+ if r.TryDecodeAsNil() {
+ x.LeaderElect = false
+ } else {
+ x.LeaderElect = bool(r.DecodeBool())
+ }
+ case "leaseDuration":
+ if r.TryDecodeAsNil() {
+ x.LeaseDuration = pkg1_unversioned.Duration{}
+ } else {
+ yyv5 := &x.LeaseDuration
+ 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)
+ }
+ }
+ case "renewDeadline":
+ if r.TryDecodeAsNil() {
+ x.RenewDeadline = pkg1_unversioned.Duration{}
+ } else {
+ yyv7 := &x.RenewDeadline
+ 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)
+ }
+ }
+ case "retryPeriod":
+ if r.TryDecodeAsNil() {
+ x.RetryPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv9 := &x.RetryPeriod
+ 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)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LeaderElectionConfiguration) 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.LeaderElect = false
+ } else {
+ x.LeaderElect = bool(r.DecodeBool())
+ }
+ 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.LeaseDuration = pkg1_unversioned.Duration{}
+ } else {
+ yyv13 := &x.LeaseDuration
+ 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)
+ }
+ }
+ 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.RenewDeadline = pkg1_unversioned.Duration{}
+ } else {
+ yyv15 := &x.RenewDeadline
+ 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)
+ }
+ }
+ 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.RetryPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv17 := &x.RetryPeriod
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(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 *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [50]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[48] = x.Kind != ""
+ yyq2[49] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(50)
+ } else {
+ yynn2 = 48
+ 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_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_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cloudProvider"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentEndpointSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentEndpointSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentEndpointSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentRSSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentRSSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentRSSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentRCSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentRCSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentRCSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentResourceQuotaSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentDeploymentSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentDeploymentSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentDeploymentSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentDaemonSetSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentJobSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentJobSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentJobSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentNamespaceSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentNamespaceSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentNamespaceSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym40 := z.EncBinary()
+ _ = yym40
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentSATokenSyncs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrentSATokenSyncs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ConcurrentSATokenSyncs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LookupCacheSizeForRC))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LookupCacheSizeForRC))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LookupCacheSizeForRS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LookupCacheSizeForRS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym49 := z.EncBinary()
+ _ = yym49
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForDaemonSet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy52 := &x.ServiceSyncPeriod
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy52) {
+ } else if !yym53 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy52)
+ } else {
+ z.EncFallback(yy52)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy54 := &x.ServiceSyncPeriod
+ yym55 := z.EncBinary()
+ _ = yym55
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy54) {
+ } else if !yym55 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy54)
+ } else {
+ z.EncFallback(yy54)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy57 := &x.NodeSyncPeriod
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy57) {
+ } else if !yym58 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy57)
+ } else {
+ z.EncFallback(yy57)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy59 := &x.NodeSyncPeriod
+ yym60 := z.EncBinary()
+ _ = yym60
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy59) {
+ } else if !yym60 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy59)
+ } else {
+ z.EncFallback(yy59)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy62 := &x.ResourceQuotaSyncPeriod
+ yym63 := z.EncBinary()
+ _ = yym63
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy62) {
+ } else if !yym63 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy62)
+ } else {
+ z.EncFallback(yy62)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy64 := &x.ResourceQuotaSyncPeriod
+ yym65 := z.EncBinary()
+ _ = yym65
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy64) {
+ } else if !yym65 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy64)
+ } else {
+ z.EncFallback(yy64)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy67 := &x.NamespaceSyncPeriod
+ yym68 := z.EncBinary()
+ _ = yym68
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy67) {
+ } else if !yym68 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy67)
+ } else {
+ z.EncFallback(yy67)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy69 := &x.NamespaceSyncPeriod
+ yym70 := z.EncBinary()
+ _ = yym70
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy69) {
+ } else if !yym70 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy69)
+ } else {
+ z.EncFallback(yy69)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy72 := &x.PVClaimBinderSyncPeriod
+ yym73 := z.EncBinary()
+ _ = yym73
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy72) {
+ } else if !yym73 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy72)
+ } else {
+ z.EncFallback(yy72)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy74 := &x.PVClaimBinderSyncPeriod
+ yym75 := z.EncBinary()
+ _ = yym75
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy74) {
+ } else if !yym75 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy74)
+ } else {
+ z.EncFallback(yy74)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy77 := &x.MinResyncPeriod
+ yym78 := z.EncBinary()
+ _ = yym78
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy77) {
+ } else if !yym78 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy77)
+ } else {
+ z.EncFallback(yy77)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy79 := &x.MinResyncPeriod
+ yym80 := z.EncBinary()
+ _ = yym80
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy79) {
+ } else if !yym80 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy79)
+ } else {
+ z.EncFallback(yy79)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym82 := z.EncBinary()
+ _ = yym82
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TerminatedPodGCThreshold))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminatedPodGCThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym83 := z.EncBinary()
+ _ = yym83
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TerminatedPodGCThreshold))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy85 := &x.HorizontalPodAutoscalerSyncPeriod
+ yym86 := z.EncBinary()
+ _ = yym86
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy85) {
+ } else if !yym86 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy85)
+ } else {
+ z.EncFallback(yy85)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy87 := &x.HorizontalPodAutoscalerSyncPeriod
+ yym88 := z.EncBinary()
+ _ = yym88
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy87) {
+ } else if !yym88 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy87)
+ } else {
+ z.EncFallback(yy87)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy90 := &x.DeploymentControllerSyncPeriod
+ yym91 := z.EncBinary()
+ _ = yym91
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy90) {
+ } else if !yym91 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy90)
+ } else {
+ z.EncFallback(yy90)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy92 := &x.DeploymentControllerSyncPeriod
+ yym93 := z.EncBinary()
+ _ = yym93
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy92) {
+ } else if !yym93 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy92)
+ } else {
+ z.EncFallback(yy92)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy95 := &x.PodEvictionTimeout
+ yym96 := z.EncBinary()
+ _ = yym96
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy95) {
+ } else if !yym96 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy95)
+ } else {
+ z.EncFallback(yy95)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy97 := &x.PodEvictionTimeout
+ yym98 := z.EncBinary()
+ _ = yym98
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy97) {
+ } else if !yym98 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy97)
+ } else {
+ z.EncFallback(yy97)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym100 := z.EncBinary()
+ _ = yym100
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.DeletingPodsQps))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym101 := z.EncBinary()
+ _ = yym101
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.DeletingPodsQps))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym103 := z.EncBinary()
+ _ = yym103
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DeletingPodsBurst))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deletingPodsBurst"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym104 := z.EncBinary()
+ _ = yym104
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DeletingPodsBurst))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy106 := &x.NodeMonitorGracePeriod
+ yym107 := z.EncBinary()
+ _ = yym107
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy106) {
+ } else if !yym107 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy106)
+ } else {
+ z.EncFallback(yy106)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorGracePeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy108 := &x.NodeMonitorGracePeriod
+ yym109 := z.EncBinary()
+ _ = yym109
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy108) {
+ } else if !yym109 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy108)
+ } else {
+ z.EncFallback(yy108)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym111 := z.EncBinary()
+ _ = yym111
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RegisterRetryCount))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registerRetryCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym112 := z.EncBinary()
+ _ = yym112
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RegisterRetryCount))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy114 := &x.NodeStartupGracePeriod
+ yym115 := z.EncBinary()
+ _ = yym115
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy114) {
+ } else if !yym115 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy114)
+ } else {
+ z.EncFallback(yy114)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy116 := &x.NodeStartupGracePeriod
+ yym117 := z.EncBinary()
+ _ = yym117
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy116) {
+ } else if !yym117 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy116)
+ } else {
+ z.EncFallback(yy116)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy119 := &x.NodeMonitorPeriod
+ yym120 := z.EncBinary()
+ _ = yym120
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy119) {
+ } else if !yym120 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy119)
+ } else {
+ z.EncFallback(yy119)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy121 := &x.NodeMonitorPeriod
+ yym122 := z.EncBinary()
+ _ = yym122
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy121) {
+ } else if !yym122 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy121)
+ } else {
+ z.EncFallback(yy121)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym124 := z.EncBinary()
+ _ = yym124
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccountKeyFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym125 := z.EncBinary()
+ _ = yym125
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym127 := z.EncBinary()
+ _ = yym127
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableProfiling))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableProfiling"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym128 := z.EncBinary()
+ _ = yym128
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableProfiling))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym130 := z.EncBinary()
+ _ = yym130
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym131 := z.EncBinary()
+ _ = yym131
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym133 := z.EncBinary()
+ _ = yym133
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym134 := z.EncBinary()
+ _ = yym134
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym136 := z.EncBinary()
+ _ = yym136
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym137 := z.EncBinary()
+ _ = yym137
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym139 := z.EncBinary()
+ _ = yym139
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodeCIDRMaskSize))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeCIDRMaskSize"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym140 := z.EncBinary()
+ _ = yym140
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodeCIDRMaskSize))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym142 := z.EncBinary()
+ _ = yym142
+ if false {
+ } else {
+ r.EncodeBool(bool(x.AllocateNodeCIDRs))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allocateNodeCIDRs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym143 := z.EncBinary()
+ _ = yym143
+ if false {
+ } else {
+ r.EncodeBool(bool(x.AllocateNodeCIDRs))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym145 := z.EncBinary()
+ _ = yym145
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ConfigureCloudRoutes))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configureCloudRoutes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym146 := z.EncBinary()
+ _ = yym146
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ConfigureCloudRoutes))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym148 := z.EncBinary()
+ _ = yym148
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rootCAFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym149 := z.EncBinary()
+ _ = yym149
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym151 := z.EncBinary()
+ _ = yym151
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("contentType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym152 := z.EncBinary()
+ _ = yym152
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym154 := z.EncBinary()
+ _ = yym154
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.KubeAPIQPS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym155 := z.EncBinary()
+ _ = yym155
+ if false {
+ } else {
+ r.EncodeFloat32(float32(x.KubeAPIQPS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym157 := z.EncBinary()
+ _ = yym157
+ if false {
+ } else {
+ r.EncodeInt(int64(x.KubeAPIBurst))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym158 := z.EncBinary()
+ _ = yym158
+ if false {
+ } else {
+ r.EncodeInt(int64(x.KubeAPIBurst))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy160 := &x.LeaderElection
+ yy160.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("leaderElection"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy162 := &x.LeaderElection
+ yy162.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy165 := &x.VolumeConfiguration
+ yy165.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeConfiguration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy167 := &x.VolumeConfiguration
+ yy167.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy170 := &x.ControllerStartInterval
+ yym171 := z.EncBinary()
+ _ = yym171
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy170) {
+ } else if !yym171 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy170)
+ } else {
+ z.EncFallback(yy170)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("controllerStartInterval"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy172 := &x.ControllerStartInterval
+ yym173 := z.EncBinary()
+ _ = yym173
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy172) {
+ } else if !yym173 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy172)
+ } else {
+ z.EncFallback(yy172)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym175 := z.EncBinary()
+ _ = yym175
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableGarbageCollector))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableGarbageCollector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym176 := z.EncBinary()
+ _ = yym176
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableGarbageCollector))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[48] {
+ yym178 := z.EncBinary()
+ _ = yym178
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[48] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym179 := z.EncBinary()
+ _ = yym179
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[49] {
+ yym181 := z.EncBinary()
+ _ = yym181
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[49] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym182 := z.EncBinary()
+ _ = yym182
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *KubeControllerManagerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(r.DecodeString())
+ }
+ case "cloudProvider":
+ if r.TryDecodeAsNil() {
+ x.CloudProvider = ""
+ } else {
+ x.CloudProvider = string(r.DecodeString())
+ }
+ case "cloudConfigFile":
+ if r.TryDecodeAsNil() {
+ x.CloudConfigFile = ""
+ } else {
+ x.CloudConfigFile = string(r.DecodeString())
+ }
+ case "concurrentEndpointSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentEndpointSyncs = 0
+ } else {
+ x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentRSSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentRSSyncs = 0
+ } else {
+ x.ConcurrentRSSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentRCSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentRCSyncs = 0
+ } else {
+ x.ConcurrentRCSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentResourceQuotaSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentResourceQuotaSyncs = 0
+ } else {
+ x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentDeploymentSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentDeploymentSyncs = 0
+ } else {
+ x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentDaemonSetSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentDaemonSetSyncs = 0
+ } else {
+ x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentJobSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentJobSyncs = 0
+ } else {
+ x.ConcurrentJobSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentNamespaceSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentNamespaceSyncs = 0
+ } else {
+ x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32))
+ }
+ case "concurrentSATokenSyncs":
+ if r.TryDecodeAsNil() {
+ x.ConcurrentSATokenSyncs = 0
+ } else {
+ x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32))
+ }
+ case "lookupCacheSizeForRC":
+ if r.TryDecodeAsNil() {
+ x.LookupCacheSizeForRC = 0
+ } else {
+ x.LookupCacheSizeForRC = int32(r.DecodeInt(32))
+ }
+ case "lookupCacheSizeForRS":
+ if r.TryDecodeAsNil() {
+ x.LookupCacheSizeForRS = 0
+ } else {
+ x.LookupCacheSizeForRS = int32(r.DecodeInt(32))
+ }
+ case "lookupCacheSizeForDaemonSet":
+ if r.TryDecodeAsNil() {
+ x.LookupCacheSizeForDaemonSet = 0
+ } else {
+ x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32))
+ }
+ case "serviceSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.ServiceSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv20 := &x.ServiceSyncPeriod
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv20) {
+ } else if !yym21 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv20)
+ } else {
+ z.DecFallback(yyv20, false)
+ }
+ }
+ case "nodeSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.NodeSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv22 := &x.NodeSyncPeriod
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv22) {
+ } else if !yym23 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv22)
+ } else {
+ z.DecFallback(yyv22, false)
+ }
+ }
+ case "resourceQuotaSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv24 := &x.ResourceQuotaSyncPeriod
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv24) {
+ } else if !yym25 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv24)
+ } else {
+ z.DecFallback(yyv24, false)
+ }
+ }
+ case "namespaceSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.NamespaceSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv26 := &x.NamespaceSyncPeriod
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv26) {
+ } else if !yym27 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv26)
+ } else {
+ z.DecFallback(yyv26, false)
+ }
+ }
+ case "pvClaimBinderSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv28 := &x.PVClaimBinderSyncPeriod
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv28) {
+ } else if !yym29 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv28)
+ } else {
+ z.DecFallback(yyv28, false)
+ }
+ }
+ case "minResyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.MinResyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv30 := &x.MinResyncPeriod
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv30) {
+ } else if !yym31 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv30)
+ } else {
+ z.DecFallback(yyv30, false)
+ }
+ }
+ case "terminatedPodGCThreshold":
+ if r.TryDecodeAsNil() {
+ x.TerminatedPodGCThreshold = 0
+ } else {
+ x.TerminatedPodGCThreshold = int32(r.DecodeInt(32))
+ }
+ case "horizontalPodAutoscalerSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv33 := &x.HorizontalPodAutoscalerSyncPeriod
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv33) {
+ } else if !yym34 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv33)
+ } else {
+ z.DecFallback(yyv33, false)
+ }
+ }
+ case "deploymentControllerSyncPeriod":
+ if r.TryDecodeAsNil() {
+ x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv35 := &x.DeploymentControllerSyncPeriod
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv35) {
+ } else if !yym36 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv35)
+ } else {
+ z.DecFallback(yyv35, false)
+ }
+ }
+ case "podEvictionTimeout":
+ if r.TryDecodeAsNil() {
+ x.PodEvictionTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv37 := &x.PodEvictionTimeout
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv37) {
+ } else if !yym38 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv37)
+ } else {
+ z.DecFallback(yyv37, false)
+ }
+ }
+ case "deletingPodsQps":
+ if r.TryDecodeAsNil() {
+ x.DeletingPodsQps = 0
+ } else {
+ x.DeletingPodsQps = float32(r.DecodeFloat(true))
+ }
+ case "deletingPodsBurst":
+ if r.TryDecodeAsNil() {
+ x.DeletingPodsBurst = 0
+ } else {
+ x.DeletingPodsBurst = int32(r.DecodeInt(32))
+ }
+ case "nodeMonitorGracePeriod":
+ if r.TryDecodeAsNil() {
+ x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv41 := &x.NodeMonitorGracePeriod
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv41) {
+ } else if !yym42 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv41)
+ } else {
+ z.DecFallback(yyv41, false)
+ }
+ }
+ case "registerRetryCount":
+ if r.TryDecodeAsNil() {
+ x.RegisterRetryCount = 0
+ } else {
+ x.RegisterRetryCount = int32(r.DecodeInt(32))
+ }
+ case "nodeStartupGracePeriod":
+ if r.TryDecodeAsNil() {
+ x.NodeStartupGracePeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv44 := &x.NodeStartupGracePeriod
+ yym45 := z.DecBinary()
+ _ = yym45
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv44) {
+ } else if !yym45 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv44)
+ } else {
+ z.DecFallback(yyv44, false)
+ }
+ }
+ case "nodeMonitorPeriod":
+ if r.TryDecodeAsNil() {
+ x.NodeMonitorPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv46 := &x.NodeMonitorPeriod
+ yym47 := z.DecBinary()
+ _ = yym47
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv46) {
+ } else if !yym47 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv46)
+ } else {
+ z.DecFallback(yyv46, false)
+ }
+ }
+ case "serviceAccountKeyFile":
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountKeyFile = ""
+ } else {
+ x.ServiceAccountKeyFile = string(r.DecodeString())
+ }
+ case "enableProfiling":
+ if r.TryDecodeAsNil() {
+ x.EnableProfiling = false
+ } else {
+ x.EnableProfiling = bool(r.DecodeBool())
+ }
+ case "clusterName":
+ if r.TryDecodeAsNil() {
+ x.ClusterName = ""
+ } else {
+ x.ClusterName = string(r.DecodeString())
+ }
+ case "clusterCIDR":
+ if r.TryDecodeAsNil() {
+ x.ClusterCIDR = ""
+ } else {
+ x.ClusterCIDR = string(r.DecodeString())
+ }
+ case "serviceCIDR":
+ if r.TryDecodeAsNil() {
+ x.ServiceCIDR = ""
+ } else {
+ x.ServiceCIDR = string(r.DecodeString())
+ }
+ case "nodeCIDRMaskSize":
+ if r.TryDecodeAsNil() {
+ x.NodeCIDRMaskSize = 0
+ } else {
+ x.NodeCIDRMaskSize = int32(r.DecodeInt(32))
+ }
+ case "allocateNodeCIDRs":
+ if r.TryDecodeAsNil() {
+ x.AllocateNodeCIDRs = false
+ } else {
+ x.AllocateNodeCIDRs = bool(r.DecodeBool())
+ }
+ case "configureCloudRoutes":
+ if r.TryDecodeAsNil() {
+ x.ConfigureCloudRoutes = false
+ } else {
+ x.ConfigureCloudRoutes = bool(r.DecodeBool())
+ }
+ case "rootCAFile":
+ if r.TryDecodeAsNil() {
+ x.RootCAFile = ""
+ } else {
+ x.RootCAFile = string(r.DecodeString())
+ }
+ case "contentType":
+ if r.TryDecodeAsNil() {
+ x.ContentType = ""
+ } else {
+ x.ContentType = string(r.DecodeString())
+ }
+ case "kubeAPIQPS":
+ if r.TryDecodeAsNil() {
+ x.KubeAPIQPS = 0
+ } else {
+ x.KubeAPIQPS = float32(r.DecodeFloat(true))
+ }
+ case "kubeAPIBurst":
+ if r.TryDecodeAsNil() {
+ x.KubeAPIBurst = 0
+ } else {
+ x.KubeAPIBurst = int32(r.DecodeInt(32))
+ }
+ case "leaderElection":
+ if r.TryDecodeAsNil() {
+ x.LeaderElection = LeaderElectionConfiguration{}
+ } else {
+ yyv60 := &x.LeaderElection
+ yyv60.CodecDecodeSelf(d)
+ }
+ case "volumeConfiguration":
+ if r.TryDecodeAsNil() {
+ x.VolumeConfiguration = VolumeConfiguration{}
+ } else {
+ yyv61 := &x.VolumeConfiguration
+ yyv61.CodecDecodeSelf(d)
+ }
+ case "controllerStartInterval":
+ if r.TryDecodeAsNil() {
+ x.ControllerStartInterval = pkg1_unversioned.Duration{}
+ } else {
+ yyv62 := &x.ControllerStartInterval
+ yym63 := z.DecBinary()
+ _ = yym63
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv62) {
+ } else if !yym63 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv62)
+ } else {
+ z.DecFallback(yyv62, false)
+ }
+ }
+ case "enableGarbageCollector":
+ if r.TryDecodeAsNil() {
+ x.EnableGarbageCollector = false
+ } else {
+ x.EnableGarbageCollector = bool(r.DecodeBool())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj67 int
+ var yyb67 bool
+ var yyhl67 bool = l >= 0
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ x.Port = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ x.Address = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CloudProvider = ""
+ } else {
+ x.CloudProvider = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CloudConfigFile = ""
+ } else {
+ x.CloudConfigFile = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentEndpointSyncs = 0
+ } else {
+ x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentRSSyncs = 0
+ } else {
+ x.ConcurrentRSSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentRCSyncs = 0
+ } else {
+ x.ConcurrentRCSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentResourceQuotaSyncs = 0
+ } else {
+ x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentDeploymentSyncs = 0
+ } else {
+ x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentDaemonSetSyncs = 0
+ } else {
+ x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentJobSyncs = 0
+ } else {
+ x.ConcurrentJobSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentNamespaceSyncs = 0
+ } else {
+ x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrentSATokenSyncs = 0
+ } else {
+ x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LookupCacheSizeForRC = 0
+ } else {
+ x.LookupCacheSizeForRC = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LookupCacheSizeForRS = 0
+ } else {
+ x.LookupCacheSizeForRS = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LookupCacheSizeForDaemonSet = 0
+ } else {
+ x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv84 := &x.ServiceSyncPeriod
+ yym85 := z.DecBinary()
+ _ = yym85
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv84) {
+ } else if !yym85 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv84)
+ } else {
+ z.DecFallback(yyv84, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv86 := &x.NodeSyncPeriod
+ yym87 := z.DecBinary()
+ _ = yym87
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv86) {
+ } else if !yym87 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv86)
+ } else {
+ z.DecFallback(yyv86, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv88 := &x.ResourceQuotaSyncPeriod
+ yym89 := z.DecBinary()
+ _ = yym89
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv88) {
+ } else if !yym89 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv88)
+ } else {
+ z.DecFallback(yyv88, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NamespaceSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv90 := &x.NamespaceSyncPeriod
+ yym91 := z.DecBinary()
+ _ = yym91
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv90) {
+ } else if !yym91 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv90)
+ } else {
+ z.DecFallback(yyv90, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv92 := &x.PVClaimBinderSyncPeriod
+ yym93 := z.DecBinary()
+ _ = yym93
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv92) {
+ } else if !yym93 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv92)
+ } else {
+ z.DecFallback(yyv92, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinResyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv94 := &x.MinResyncPeriod
+ yym95 := z.DecBinary()
+ _ = yym95
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv94) {
+ } else if !yym95 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv94)
+ } else {
+ z.DecFallback(yyv94, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminatedPodGCThreshold = 0
+ } else {
+ x.TerminatedPodGCThreshold = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv97 := &x.HorizontalPodAutoscalerSyncPeriod
+ yym98 := z.DecBinary()
+ _ = yym98
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv97) {
+ } else if !yym98 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv97)
+ } else {
+ z.DecFallback(yyv97, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv99 := &x.DeploymentControllerSyncPeriod
+ yym100 := z.DecBinary()
+ _ = yym100
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv99) {
+ } else if !yym100 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv99)
+ } else {
+ z.DecFallback(yyv99, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodEvictionTimeout = pkg1_unversioned.Duration{}
+ } else {
+ yyv101 := &x.PodEvictionTimeout
+ yym102 := z.DecBinary()
+ _ = yym102
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv101) {
+ } else if !yym102 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv101)
+ } else {
+ z.DecFallback(yyv101, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DeletingPodsQps = 0
+ } else {
+ x.DeletingPodsQps = float32(r.DecodeFloat(true))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DeletingPodsBurst = 0
+ } else {
+ x.DeletingPodsBurst = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv105 := &x.NodeMonitorGracePeriod
+ yym106 := z.DecBinary()
+ _ = yym106
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv105) {
+ } else if !yym106 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv105)
+ } else {
+ z.DecFallback(yyv105, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RegisterRetryCount = 0
+ } else {
+ x.RegisterRetryCount = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeStartupGracePeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv108 := &x.NodeStartupGracePeriod
+ yym109 := z.DecBinary()
+ _ = yym109
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv108) {
+ } else if !yym109 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv108)
+ } else {
+ z.DecFallback(yyv108, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeMonitorPeriod = pkg1_unversioned.Duration{}
+ } else {
+ yyv110 := &x.NodeMonitorPeriod
+ yym111 := z.DecBinary()
+ _ = yym111
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv110) {
+ } else if !yym111 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv110)
+ } else {
+ z.DecFallback(yyv110, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountKeyFile = ""
+ } else {
+ x.ServiceAccountKeyFile = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnableProfiling = false
+ } else {
+ x.EnableProfiling = bool(r.DecodeBool())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterName = ""
+ } else {
+ x.ClusterName = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterCIDR = ""
+ } else {
+ x.ClusterCIDR = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceCIDR = ""
+ } else {
+ x.ServiceCIDR = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeCIDRMaskSize = 0
+ } else {
+ x.NodeCIDRMaskSize = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AllocateNodeCIDRs = false
+ } else {
+ x.AllocateNodeCIDRs = bool(r.DecodeBool())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConfigureCloudRoutes = false
+ } else {
+ x.ConfigureCloudRoutes = bool(r.DecodeBool())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RootCAFile = ""
+ } else {
+ x.RootCAFile = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContentType = ""
+ } else {
+ x.ContentType = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeAPIQPS = 0
+ } else {
+ x.KubeAPIQPS = float32(r.DecodeFloat(true))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeAPIBurst = 0
+ } else {
+ x.KubeAPIBurst = int32(r.DecodeInt(32))
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LeaderElection = LeaderElectionConfiguration{}
+ } else {
+ yyv124 := &x.LeaderElection
+ yyv124.CodecDecodeSelf(d)
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeConfiguration = VolumeConfiguration{}
+ } else {
+ yyv125 := &x.VolumeConfiguration
+ yyv125.CodecDecodeSelf(d)
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ControllerStartInterval = pkg1_unversioned.Duration{}
+ } else {
+ yyv126 := &x.ControllerStartInterval
+ yym127 := z.DecBinary()
+ _ = yym127
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv126) {
+ } else if !yym127 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv126)
+ } else {
+ z.DecFallback(yyv126, false)
+ }
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnableGarbageCollector = false
+ } else {
+ x.EnableGarbageCollector = bool(r.DecodeBool())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ for {
+ yyj67++
+ if yyhl67 {
+ yyb67 = yyj67 > l
+ } else {
+ yyb67 = r.CheckBreak()
+ }
+ if yyb67 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj67-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } 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.EncodeBool(bool(x.EnableHostPathProvisioning))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableHostPathProvisioning"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableHostPathProvisioning))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableDynamicProvisioning))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("enableDynamicProvisioning"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.EnableDynamicProvisioning))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy10 := &x.PersistentVolumeRecyclerConfiguration
+ yy10.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persitentVolumeRecyclerConfiguration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.PersistentVolumeRecyclerConfiguration
+ yy12.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolumePluginDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "enableHostPathProvisioning":
+ if r.TryDecodeAsNil() {
+ x.EnableHostPathProvisioning = false
+ } else {
+ x.EnableHostPathProvisioning = bool(r.DecodeBool())
+ }
+ case "enableDynamicProvisioning":
+ if r.TryDecodeAsNil() {
+ x.EnableDynamicProvisioning = false
+ } else {
+ x.EnableDynamicProvisioning = bool(r.DecodeBool())
+ }
+ case "persitentVolumeRecyclerConfiguration":
+ if r.TryDecodeAsNil() {
+ x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{}
+ } else {
+ yyv6 := &x.PersistentVolumeRecyclerConfiguration
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "flexVolumePluginDir":
+ if r.TryDecodeAsNil() {
+ x.FlexVolumePluginDir = ""
+ } else {
+ x.FlexVolumePluginDir = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeConfiguration) 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.EnableHostPathProvisioning = false
+ } else {
+ x.EnableHostPathProvisioning = bool(r.DecodeBool())
+ }
+ 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.EnableDynamicProvisioning = false
+ } else {
+ x.EnableDynamicProvisioning = bool(r.DecodeBool())
+ }
+ 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.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{}
+ } else {
+ yyv11 := &x.PersistentVolumeRecyclerConfiguration
+ yyv11.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.FlexVolumePluginDir = ""
+ } else {
+ x.FlexVolumePluginDir = string(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 *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 7
+ 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.MaximumRetry))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maximumRetry"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaximumRetry))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinimumTimeoutNFS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutNFS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinimumTimeoutNFS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathNFS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.IncrementTimeoutNFS))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutNFS"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.IncrementTimeoutNFS))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathHostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinimumTimeoutHostPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutHostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinimumTimeoutHostPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.IncrementTimeoutHostPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutHostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.IncrementTimeoutHostPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeRecyclerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maximumRetry":
+ if r.TryDecodeAsNil() {
+ x.MaximumRetry = 0
+ } else {
+ x.MaximumRetry = int32(r.DecodeInt(32))
+ }
+ case "minimumTimeoutNFS":
+ if r.TryDecodeAsNil() {
+ x.MinimumTimeoutNFS = 0
+ } else {
+ x.MinimumTimeoutNFS = int32(r.DecodeInt(32))
+ }
+ case "podTemplateFilePathNFS":
+ if r.TryDecodeAsNil() {
+ x.PodTemplateFilePathNFS = ""
+ } else {
+ x.PodTemplateFilePathNFS = string(r.DecodeString())
+ }
+ case "incrementTimeoutNFS":
+ if r.TryDecodeAsNil() {
+ x.IncrementTimeoutNFS = 0
+ } else {
+ x.IncrementTimeoutNFS = int32(r.DecodeInt(32))
+ }
+ case "podTemplateFilePathHostPath":
+ if r.TryDecodeAsNil() {
+ x.PodTemplateFilePathHostPath = ""
+ } else {
+ x.PodTemplateFilePathHostPath = string(r.DecodeString())
+ }
+ case "minimumTimeoutHostPath":
+ if r.TryDecodeAsNil() {
+ x.MinimumTimeoutHostPath = 0
+ } else {
+ x.MinimumTimeoutHostPath = int32(r.DecodeInt(32))
+ }
+ case "incrementTimeoutHostPath":
+ if r.TryDecodeAsNil() {
+ x.IncrementTimeoutHostPath = 0
+ } else {
+ x.IncrementTimeoutHostPath = int32(r.DecodeInt(32))
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeRecyclerConfiguration) 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.MaximumRetry = 0
+ } else {
+ x.MaximumRetry = 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.MinimumTimeoutNFS = 0
+ } else {
+ x.MinimumTimeoutNFS = 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.PodTemplateFilePathNFS = ""
+ } else {
+ x.PodTemplateFilePathNFS = string(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.IncrementTimeoutNFS = 0
+ } else {
+ x.IncrementTimeoutNFS = 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.PodTemplateFilePathHostPath = ""
+ } else {
+ x.PodTemplateFilePathHostPath = string(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.MinimumTimeoutHostPath = 0
+ } else {
+ x.MinimumTimeoutHostPath = 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.IncrementTimeoutHostPath = 0
+ } else {
+ x.IncrementTimeoutHostPath = 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)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go
new file mode 100644
index 0000000..97e9233
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go
@@ -0,0 +1,621 @@
+/*
+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 componentconfig
+
+import "k8s.io/kubernetes/pkg/api/unversioned"
+
+type KubeProxyConfiguration struct {
+ unversioned.TypeMeta
+
+ // bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
+ // for all interfaces)
+ BindAddress string `json:"bindAddress"`
+ // clusterCIDR is the CIDR range of the pods in the cluster. It is used to
+ // bridge traffic coming from outside of the cluster. If not provided,
+ // no off-cluster bridging will be performed.
+ ClusterCIDR string `json:"clusterCIDR"`
+ // healthzBindAddress is the IP address for the health check server to serve on,
+ // defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
+ HealthzBindAddress string `json:"healthzBindAddress"`
+ // healthzPort is the port to bind the health check server. Use 0 to disable.
+ HealthzPort int32 `json:"healthzPort"`
+ // hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
+ HostnameOverride string `json:"hostnameOverride"`
+ // iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
+ // the pure iptables proxy mode. Values must be within the range [0, 31].
+ IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
+ // iptablesSyncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
+ // '2h22m'). Must be greater than 0.
+ IPTablesSyncPeriod unversioned.Duration `json:"iptablesSyncPeriodSeconds"`
+ // kubeconfigPath is the path to the kubeconfig file with authorization information (the
+ // master location is set by the master flag).
+ KubeconfigPath string `json:"kubeconfigPath"`
+ // masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
+ MasqueradeAll bool `json:"masqueradeAll"`
+ // master is the address of the Kubernetes API server (overrides any value in kubeconfig)
+ Master string `json:"master"`
+ // oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
+ // the range [-1000, 1000]
+ OOMScoreAdj *int32 `json:"oomScoreAdj"`
+ // mode specifies which proxy mode to use.
+ Mode ProxyMode `json:"mode"`
+ // portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
+ // in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
+ PortRange string `json:"portRange"`
+ // resourceContainer is the absolute name of the resource-only container to create and run
+ // the Kube-proxy in (Default: /kube-proxy).
+ ResourceContainer string `json:"kubeletCgroups"`
+ // udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
+ // Must be greater than 0. Only applicable for proxyMode=userspace.
+ UDPIdleTimeout unversioned.Duration `json:"udpTimeoutMilliseconds"`
+ // conntrackMax is the maximum number of NAT connections to track (0 to leave as-is)")
+ ConntrackMax int32 `json:"conntrackMax"`
+ // conntrackTCPEstablishedTimeout is how long an idle UDP connection will be kept open
+ // (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode is Userspace
+ ConntrackTCPEstablishedTimeout unversioned.Duration `json:"conntrackTCPEstablishedTimeout"`
+}
+
+// Currently two modes of proxying are available: 'userspace' (older, stable) or 'iptables'
+// (newer, faster). If blank, look at the Node object on the Kubernetes API and respect the
+// 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the
+// best-available proxy (currently iptables, but may change in future versions). If the
+// iptables proxy is selected, regardless of how, but the system's kernel or iptables
+// versions are insufficient, this always falls back to the userspace proxy.
+type ProxyMode string
+
+const (
+ ProxyModeUserspace ProxyMode = "userspace"
+ ProxyModeIPTables ProxyMode = "iptables"
+)
+
+// HairpinMode denotes how the kubelet should configure networking to handle
+// hairpin packets.
+type HairpinMode string
+
+// Enum settings for different ways to handle hairpin packets.
+const (
+ // Set the hairpin flag on the veth of containers in the respective
+ // container runtime.
+ HairpinVeth = "hairpin-veth"
+ // Make the container bridge promiscuous. This will force it to accept
+ // hairpin packets, even if the flag isn't set on ports of the bridge.
+ PromiscuousBridge = "promiscuous-bridge"
+ // Neither of the above. If the kubelet is started in this hairpin mode
+ // and kube-proxy is running in iptables mode, hairpin packets will be
+ // dropped by the container bridge.
+ HairpinNone = "none"
+)
+
+// TODO: curate the ordering and structure of this config object
+type KubeletConfiguration struct {
+ // config is the path to the config file or directory of files
+ Config string `json:"config"`
+ // syncFrequency is the max period between synchronizing running
+ // containers and config
+ SyncFrequency unversioned.Duration `json:"syncFrequency"`
+ // fileCheckFrequency is the duration between checking config files for
+ // new data
+ FileCheckFrequency unversioned.Duration `json:"fileCheckFrequency"`
+ // httpCheckFrequency is the duration between checking http for new data
+ HTTPCheckFrequency unversioned.Duration `json:"httpCheckFrequency"`
+ // manifestURL is the URL for accessing the container manifest
+ ManifestURL string `json:"manifestURL"`
+ // manifestURLHeader is the HTTP header to use when accessing the manifest
+ // URL, with the key separated from the value with a ':', as in 'key:value'
+ ManifestURLHeader string `json:"manifestURLHeader"`
+ // enableServer enables the Kubelet's server
+ EnableServer bool `json:"enableServer"`
+ // address is the IP address for the Kubelet to serve on (set to 0.0.0.0
+ // for all interfaces)
+ Address string `json:"address"`
+ // port is the port for the Kubelet to serve on.
+ Port uint `json:"port"`
+ // readOnlyPort is the read-only port for the Kubelet to serve on with
+ // no authentication/authorization (set to 0 to disable)
+ ReadOnlyPort uint `json:"readOnlyPort"`
+ // tLSCertFile is the file containing x509 Certificate for HTTPS. (CA cert,
+ // if any, concatenated after server cert). If tlsCertFile and
+ // tlsPrivateKeyFile are not provided, a self-signed certificate
+ // and key are generated for the public address and saved to the directory
+ // passed to certDir.
+ TLSCertFile string `json:"tLSCertFile"`
+ // tLSPrivateKeyFile is the ile containing x509 private key matching
+ // tlsCertFile.
+ TLSPrivateKeyFile string `json:"tLSPrivateKeyFile"`
+ // certDirectory is the directory where the TLS certs are located (by
+ // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile
+ // are provided, this flag will be ignored.
+ CertDirectory string `json:"certDirectory"`
+ // hostnameOverride is the hostname used to identify the kubelet instead
+ // of the actual hostname.
+ HostnameOverride string `json:"hostnameOverride"`
+ // podInfraContainerImage is the image whose network/ipc namespaces
+ // containers in each pod will use.
+ PodInfraContainerImage string `json:"podInfraContainerImage"`
+ // dockerEndpoint is the path to the docker endpoint to communicate with.
+ DockerEndpoint string `json:"dockerEndpoint"`
+ // rootDirectory is the directory path to place kubelet files (volume
+ // mounts,etc).
+ RootDirectory string `json:"rootDirectory"`
+ // seccompProfileRoot is the directory path for seccomp profiles.
+ SeccompProfileRoot string `json:"seccompProfileRoot"`
+ // allowPrivileged enables containers to request privileged mode.
+ // Defaults to false.
+ AllowPrivileged bool `json:"allowPrivileged"`
+ // hostNetworkSources is a comma-separated list of sources from which the
+ // Kubelet allows pods to use of host network. Defaults to "*".
+ HostNetworkSources string `json:"hostNetworkSources"`
+ // hostPIDSources is a comma-separated list of sources from which the
+ // Kubelet allows pods to use the host pid namespace. Defaults to "*".
+ HostPIDSources string `json:"hostPIDSources"`
+ // hostIPCSources is a comma-separated list of sources from which the
+ // Kubelet allows pods to use the host ipc namespace. Defaults to "*".
+ HostIPCSources string `json:"hostIPCSources"`
+ // registryPullQPS is the limit of registry pulls per second. If 0,
+ // unlimited. Set to 0 for no limit. Defaults to 5.0.
+ RegistryPullQPS float64 `json:"registryPullQPS"`
+ // registryBurst is the maximum size of a bursty pulls, temporarily allows
+ // pulls to burst to this number, while still not exceeding registryQps.
+ // Only used if registryQps > 0.
+ RegistryBurst int32 `json:"registryBurst"`
+ // eventRecordQPS is the maximum event creations per second. If 0, there
+ // is no limit enforced.
+ EventRecordQPS float32 `json:"eventRecordQPS"`
+ // eventBurst is the maximum size of a bursty event records, temporarily
+ // allows event records to burst to this number, while still not exceeding
+ // event-qps. Only used if eventQps > 0
+ EventBurst int32 `json:"eventBurst"`
+ // enableDebuggingHandlers enables server endpoints for log collection
+ // and local running of containers and commands
+ EnableDebuggingHandlers bool `json:"enableDebuggingHandlers"`
+ // minimumGCAge is the minimum age for a finished container before it is
+ // garbage collected.
+ MinimumGCAge unversioned.Duration `json:"minimumGCAge"`
+ // maxPerPodContainerCount is the maximum number of old instances to
+ // retain per container. Each container takes up some disk space.
+ MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount"`
+ // maxContainerCount is the maximum number of old instances of containers
+ // to retain globally. Each container takes up some disk space.
+ MaxContainerCount int32 `json:"maxContainerCount"`
+ // cAdvisorPort is the port of the localhost cAdvisor endpoint
+ CAdvisorPort uint `json:"cAdvisorPort"`
+ // healthzPort is the port of the localhost healthz endpoint
+ HealthzPort int32 `json:"healthzPort"`
+ // healthzBindAddress is the IP address for the healthz server to serve
+ // on.
+ HealthzBindAddress string `json:"healthzBindAddress"`
+ // oomScoreAdj is The oom-score-adj value for kubelet process. Values
+ // must be within the range [-1000, 1000].
+ OOMScoreAdj int32 `json:"oomScoreAdj"`
+ // registerNode enables automatic registration with the apiserver.
+ RegisterNode bool `json:"registerNode"`
+ // clusterDomain is the DNS domain for this cluster. If set, kubelet will
+ // configure all containers to search this domain in addition to the
+ // host's search domains.
+ ClusterDomain string `json:"clusterDomain"`
+ // masterServiceNamespace is The namespace from which the kubernetes
+ // master services should be injected into pods.
+ MasterServiceNamespace string `json:"masterServiceNamespace"`
+ // clusterDNS is the IP address for a cluster DNS server. If set, kubelet
+ // will configure all containers to use this for DNS resolution in
+ // addition to the host's DNS servers
+ ClusterDNS string `json:"clusterDNS"`
+ // streamingConnectionIdleTimeout is the maximum time a streaming connection
+ // can be idle before the connection is automatically closed.
+ StreamingConnectionIdleTimeout unversioned.Duration `json:"streamingConnectionIdleTimeout"`
+ // nodeStatusUpdateFrequency is the frequency that kubelet posts node
+ // status to master. Note: be cautious when changing the constant, it
+ // must work with nodeMonitorGracePeriod in nodecontroller.
+ NodeStatusUpdateFrequency unversioned.Duration `json:"nodeStatusUpdateFrequency"`
+ // minimumGCAge is the minimum age for a unused image before it is
+ // garbage collected.
+ ImageMinimumGCAge unversioned.Duration `json:"imageMinimumGCAge"`
+ // imageGCHighThresholdPercent is the percent of disk usage after which
+ // image garbage collection is always run.
+ ImageGCHighThresholdPercent int32 `json:"imageGCHighThresholdPercent"`
+ // imageGCLowThresholdPercent is the percent of disk usage before which
+ // image garbage collection is never run. Lowest disk usage to garbage
+ // collect to.
+ ImageGCLowThresholdPercent int32 `json:"imageGCLowThresholdPercent"`
+ // lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to
+ // maintain. When disk space falls below this threshold, new pods would
+ // be rejected.
+ LowDiskSpaceThresholdMB int32 `json:"lowDiskSpaceThresholdMB"`
+ // How frequently to calculate and cache volume disk usage for all pods
+ VolumeStatsAggPeriod unversioned.Duration `json:"volumeStatsAggPeriod"`
+ // networkPluginName is the name of the network plugin to be invoked for
+ // various events in kubelet/pod lifecycle
+ NetworkPluginName string `json:"networkPluginName"`
+ // networkPluginDir is the full path of the directory in which to search
+ // for network plugins
+ NetworkPluginDir string `json:"networkPluginDir"`
+ // volumePluginDir is the full path of the directory in which to search
+ // for additional third party volume plugins
+ VolumePluginDir string `json:"volumePluginDir"`
+ // cloudProvider is the provider for cloud services.
+ CloudProvider string `json:"cloudProvider,omitempty"`
+ // cloudConfigFile is the path to the cloud provider configuration file.
+ CloudConfigFile string `json:"cloudConfigFile,omitempty"`
+ // KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.
+ KubeletCgroups string `json:"kubeletCgroups,omitempty"`
+ // Cgroups that container runtime is expected to be isolated in.
+ RuntimeCgroups string `json:"runtimeCgroups,omitempty"`
+ // SystemCgroups is absolute name of cgroups in which to place
+ // all non-kernel processes that are not already in a container. Empty
+ // for no container. Rolling back the flag requires a reboot.
+ SystemCgroups string `json:"systemContainer,omitempty"`
+ // cgroupRoot is the root cgroup to use for pods. This is handled by the
+ // container runtime on a best effort basis.
+ CgroupRoot string `json:"cgroupRoot,omitempty"`
+ // containerRuntime is the container runtime to use.
+ ContainerRuntime string `json:"containerRuntime"`
+ // runtimeRequestTimeout is the timeout for all runtime requests except long running
+ // requests - pull, logs, exec and attach.
+ RuntimeRequestTimeout unversioned.Duration `json:"runtimeRequestTimeout,omitempty"`
+ // rktPath is the path of rkt binary. Leave empty to use the first rkt in
+ // $PATH.
+ RktPath string `json:"rktPath,omitempty"`
+ // rktApiEndpoint is the endpoint of the rkt API service to communicate with.
+ RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
+ // rktStage1Image is the image to use as stage1. Local paths and
+ // http/https URLs are supported.
+ RktStage1Image string `json:"rktStage1Image,omitempty"`
+ // lockFilePath is the path that kubelet will use to as a lock file.
+ // It uses this file as a lock to synchronize with other kubelet processes
+ // that may be running.
+ LockFilePath string `json:"lockFilePath"`
+ // ExitOnLockContention is a flag that signifies to the kubelet that it is running
+ // in "bootstrap" mode. This requires that 'LockFilePath' has been set.
+ // This will cause the kubelet to listen to inotify events on the lock file,
+ // releasing it and exiting when another process tries to open that file.
+ ExitOnLockContention bool `json:"exitOnLockContention"`
+ // configureCBR0 enables the kublet to configure cbr0 based on
+ // Node.Spec.PodCIDR.
+ ConfigureCBR0 bool `json:"configureCbr0"`
+ // How should the kubelet configure the container bridge for hairpin packets.
+ // Setting this flag allows endpoints in a Service to loadbalance back to
+ // themselves if they should try to access their own Service. Values:
+ // "promiscuous-bridge": make the container bridge promiscuous.
+ // "hairpin-veth": set the hairpin flag on container veth interfaces.
+ // "none": do nothing.
+ // Setting --configure-cbr0 to false implies that to achieve hairpin NAT
+ // one must set --hairpin-mode=veth-flag, because bridge assumes the
+ // existence of a container bridge named cbr0.
+ HairpinMode string `json:"hairpinMode"`
+ // The node has babysitter process monitoring docker and kubelet.
+ BabysitDaemons bool `json:"babysitDaemons"`
+ // maxPods is the number of pods that can run on this Kubelet.
+ MaxPods int32 `json:"maxPods"`
+ // nvidiaGPUs is the number of NVIDIA GPU devices on this node.
+ NvidiaGPUs int32 `json:"nvidiaGPUs"`
+ // dockerExecHandlerName is the handler to use when executing a command
+ // in a container. Valid values are 'native' and 'nsenter'. Defaults to
+ // 'native'.
+ DockerExecHandlerName string `json:"dockerExecHandlerName"`
+ // The CIDR to use for pod IP addresses, only used in standalone mode.
+ // In cluster mode, this is obtained from the master.
+ PodCIDR string `json:"podCIDR"`
+ // ResolverConfig is the resolver configuration file used as the basis
+ // for the container DNS resolution configuration."), []
+ ResolverConfig string `json:"resolvConf"`
+ // cpuCFSQuota is Enable CPU CFS quota enforcement for containers that
+ // specify CPU limits
+ CPUCFSQuota bool `json:"cpuCFSQuota"`
+ // containerized should be set to true if kubelet is running in a container.
+ Containerized bool `json:"containerized"`
+ // maxOpenFiles is Number of files that can be opened by Kubelet process.
+ MaxOpenFiles uint64 `json:"maxOpenFiles"`
+ // reconcileCIDR is Reconcile node CIDR with the CIDR specified by the
+ // API server. No-op if register-node or configure-cbr0 is false.
+ ReconcileCIDR bool `json:"reconcileCIDR"`
+ // registerSchedulable tells the kubelet to register the node as
+ // schedulable. No-op if register-node is false.
+ RegisterSchedulable bool `json:"registerSchedulable"`
+ // contentType is contentType of requests sent to apiserver.
+ ContentType string `json:"contentType"`
+ // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver
+ KubeAPIQPS float32 `json:"kubeAPIQPS"`
+ // kubeAPIBurst is the burst to allow while talking with kubernetes
+ // apiserver
+ KubeAPIBurst int32 `json:"kubeAPIBurst"`
+ // serializeImagePulls when enabled, tells the Kubelet to pull images one
+ // at a time. We recommend *not* changing the default value on nodes that
+ // run docker daemon with version < 1.9 or an Aufs storage backend.
+ // Issue #10959 has more details.
+ SerializeImagePulls bool `json:"serializeImagePulls"`
+ // experimentalFlannelOverlay enables experimental support for starting the
+ // kubelet with the default overlay network (flannel). Assumes flanneld
+ // is already running in client mode.
+ ExperimentalFlannelOverlay bool `json:"experimentalFlannelOverlay"`
+ // outOfDiskTransitionFrequency is duration for which the kubelet has to
+ // wait before transitioning out of out-of-disk node condition status.
+ OutOfDiskTransitionFrequency unversioned.Duration `json:"outOfDiskTransitionFrequency,omitempty"`
+ // nodeIP is IP address of the node. If set, kubelet will use this IP
+ // address for the node.
+ NodeIP string `json:"nodeIP,omitempty"`
+ // nodeLabels to add when registering the node in the cluster.
+ NodeLabels map[string]string `json:"nodeLabels"`
+ // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.
+ NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
+ // enable gathering custom metrics.
+ EnableCustomMetrics bool `json:"enableCustomMetrics"`
+ // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
+ EvictionHard string `json:"evictionHard,omitempty"`
+ // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
+ EvictionSoft string `json:"evictionSoft,omitempty"`
+ // Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
+ EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod,omitempty"`
+ // Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.
+ EvictionPressureTransitionPeriod unversioned.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
+ // Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.
+ EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod,omitempty"`
+ // Maximum number of pods per core. Cannot exceed MaxPods
+ PodsPerCore int32 `json:"podsPerCore"`
+ // enableControllerAttachDetach enables the Attach/Detach controller to
+ // manage attachment/detachment of volumes scheduled to this node, and
+ // disables kubelet from executing any attach/detach operations
+ EnableControllerAttachDetach bool `json:"enableControllerAttachDetach"`
+}
+
+type KubeSchedulerConfiguration struct {
+ unversioned.TypeMeta
+
+ // port is the port that the scheduler's http service runs on.
+ Port int32 `json:"port"`
+ // address is the IP address to serve on.
+ Address string `json:"address"`
+ // algorithmProvider is the scheduling algorithm provider to use.
+ AlgorithmProvider string `json:"algorithmProvider"`
+ // policyConfigFile is the filepath to the scheduler policy configuration.
+ PolicyConfigFile string `json:"policyConfigFile"`
+ // enableProfiling enables profiling via web interface.
+ EnableProfiling bool `json:"enableProfiling"`
+ // contentType is contentType of requests sent to apiserver.
+ ContentType string `json:"contentType"`
+ // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
+ KubeAPIQPS float32 `json:"kubeAPIQPS"`
+ // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
+ KubeAPIBurst int32 `json:"kubeAPIBurst"`
+ // schedulerName is name of the scheduler, used to select which pods
+ // will be processed by this scheduler, based on pod's annotation with
+ // key 'scheduler.alpha.kubernetes.io/name'.
+ SchedulerName string `json:"schedulerName"`
+ // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
+ // corresponding to every RequiredDuringScheduling affinity rule.
+ // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.
+ HardPodAffinitySymmetricWeight int `json:"hardPodAffinitySymmetricWeight"`
+ // Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
+ FailureDomains string `json:"failureDomains"`
+ // leaderElection defines the configuration of leader election client.
+ LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
+}
+
+// LeaderElectionConfiguration defines the configuration of leader election
+// clients for components that can run with leader election enabled.
+type LeaderElectionConfiguration struct {
+ // leaderElect enables a leader election client to gain leadership
+ // before executing the main loop. Enable this when running replicated
+ // components for high availability.
+ LeaderElect bool `json:"leaderElect"`
+ // leaseDuration is the duration that non-leader candidates will wait
+ // after observing a leadership renewal until attempting to acquire
+ // leadership of a led but unrenewed leader slot. This is effectively the
+ // maximum duration that a leader can be stopped before it is replaced
+ // by another candidate. This is only applicable if leader election is
+ // enabled.
+ LeaseDuration unversioned.Duration `json:"leaseDuration"`
+ // renewDeadline is the interval between attempts by the acting master to
+ // renew a leadership slot before it stops leading. This must be less
+ // than or equal to the lease duration. This is only applicable if leader
+ // election is enabled.
+ RenewDeadline unversioned.Duration `json:"renewDeadline"`
+ // retryPeriod is the duration the clients should wait between attempting
+ // acquisition and renewal of a leadership. This is only applicable if
+ // leader election is enabled.
+ RetryPeriod unversioned.Duration `json:"retryPeriod"`
+}
+
+type KubeControllerManagerConfiguration struct {
+ unversioned.TypeMeta
+
+ // port is the port that the controller-manager's http service runs on.
+ Port int32 `json:"port"`
+ // address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
+ Address string `json:"address"`
+ // cloudProvider is the provider for cloud services.
+ CloudProvider string `json:"cloudProvider"`
+ // cloudConfigFile is the path to the cloud provider configuration file.
+ CloudConfigFile string `json:"cloudConfigFile"`
+ // concurrentEndpointSyncs is the number of endpoint syncing operations
+ // that will be done concurrently. Larger number = faster endpoint updating,
+ // but more CPU (and network) load.
+ ConcurrentEndpointSyncs int32 `json:"concurrentEndpointSyncs"`
+ // concurrentRSSyncs is the number of replica sets that are allowed to sync
+ // concurrently. Larger number = more responsive replica management, but more
+ // CPU (and network) load.
+ ConcurrentRSSyncs int32 `json:"concurrentRSSyncs"`
+ // concurrentRCSyncs is the number of replication controllers that are
+ // allowed to sync concurrently. Larger number = more responsive replica
+ // management, but more CPU (and network) load.
+ ConcurrentRCSyncs int32 `json:"concurrentRCSyncs"`
+ // concurrentResourceQuotaSyncs is the number of resource quotas that are
+ // allowed to sync concurrently. Larger number = more responsive quota
+ // management, but more CPU (and network) load.
+ ConcurrentResourceQuotaSyncs int32 `json:"concurrentResourceQuotaSyncs"`
+ // concurrentDeploymentSyncs is the number of deployment objects that are
+ // allowed to sync concurrently. Larger number = more responsive deployments,
+ // but more CPU (and network) load.
+ ConcurrentDeploymentSyncs int32 `json:"concurrentDeploymentSyncs"`
+ // concurrentDaemonSetSyncs is the number of daemonset objects that are
+ // allowed to sync concurrently. Larger number = more responsive daemonset,
+ // but more CPU (and network) load.
+ ConcurrentDaemonSetSyncs int32 `json:"concurrentDaemonSetSyncs"`
+ // concurrentJobSyncs is the number of job objects that are
+ // allowed to sync concurrently. Larger number = more responsive jobs,
+ // but more CPU (and network) load.
+ ConcurrentJobSyncs int32 `json:"concurrentJobSyncs"`
+ // concurrentNamespaceSyncs is the number of namespace objects that are
+ // allowed to sync concurrently.
+ ConcurrentNamespaceSyncs int32 `json:"concurrentNamespaceSyncs"`
+ // concurrentSATokenSyncs is the number of service account token syncing operations
+ // that will be done concurrently.
+ ConcurrentSATokenSyncs int32 `json:"concurrentSATokenSyncs"`
+ // lookupCacheSizeForRC is the size of lookup cache for replication controllers.
+ // Larger number = more responsive replica management, but more MEM load.
+ LookupCacheSizeForRC int32 `json:"lookupCacheSizeForRC"`
+ // lookupCacheSizeForRS is the size of lookup cache for replicatsets.
+ // Larger number = more responsive replica management, but more MEM load.
+ LookupCacheSizeForRS int32 `json:"lookupCacheSizeForRS"`
+ // lookupCacheSizeForDaemonSet is the size of lookup cache for daemonsets.
+ // Larger number = more responsive daemonset, but more MEM load.
+ LookupCacheSizeForDaemonSet int32 `json:"lookupCacheSizeForDaemonSet"`
+ // serviceSyncPeriod is the period for syncing services with their external
+ // load balancers.
+ ServiceSyncPeriod unversioned.Duration `json:"serviceSyncPeriod"`
+ // nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer
+ // periods will result in fewer calls to cloud provider, but may delay addition
+ // of new nodes to cluster.
+ NodeSyncPeriod unversioned.Duration `json:"nodeSyncPeriod"`
+ // resourceQuotaSyncPeriod is the period for syncing quota usage status
+ // in the system.
+ ResourceQuotaSyncPeriod unversioned.Duration `json:"resourceQuotaSyncPeriod"`
+ // namespaceSyncPeriod is the period for syncing namespace life-cycle
+ // updates.
+ NamespaceSyncPeriod unversioned.Duration `json:"namespaceSyncPeriod"`
+ // pvClaimBinderSyncPeriod is the period for syncing persistent volumes
+ // and persistent volume claims.
+ PVClaimBinderSyncPeriod unversioned.Duration `json:"pvClaimBinderSyncPeriod"`
+ // minResyncPeriod is the resync period in reflectors; will be random between
+ // minResyncPeriod and 2*minResyncPeriod.
+ MinResyncPeriod unversioned.Duration `json:"minResyncPeriod"`
+ // terminatedPodGCThreshold is the number of terminated pods that can exist
+ // before the terminated pod garbage collector starts deleting terminated pods.
+ // If <= 0, the terminated pod garbage collector is disabled.
+ TerminatedPodGCThreshold int32 `json:"terminatedPodGCThreshold"`
+ // horizontalPodAutoscalerSyncPeriod is the period for syncing the number of
+ // pods in horizontal pod autoscaler.
+ HorizontalPodAutoscalerSyncPeriod unversioned.Duration `json:"horizontalPodAutoscalerSyncPeriod"`
+ // deploymentControllerSyncPeriod is the period for syncing the deployments.
+ DeploymentControllerSyncPeriod unversioned.Duration `json:"deploymentControllerSyncPeriod"`
+ // podEvictionTimeout is the grace period for deleting pods on failed nodes.
+ PodEvictionTimeout unversioned.Duration `json:"podEvictionTimeout"`
+ // deletingPodsQps is the number of nodes per second on which pods are deleted in
+ // case of node failure.
+ DeletingPodsQps float32 `json:"deletingPodsQps"`
+ // deletingPodsBurst is the number of nodes on which pods are bursty deleted in
+ // case of node failure. For more details look into RateLimiter.
+ DeletingPodsBurst int32 `json:"deletingPodsBurst"`
+ // nodeMontiorGracePeriod is the amount of time which we allow a running node to be
+ // unresponsive before marking it unhealty. Must be N times more than kubelet's
+ // nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet
+ // to post node status.
+ NodeMonitorGracePeriod unversioned.Duration `json:"nodeMonitorGracePeriod"`
+ // registerRetryCount is the number of retries for initial node registration.
+ // Retry interval equals node-sync-period.
+ RegisterRetryCount int32 `json:"registerRetryCount"`
+ // nodeStartupGracePeriod is the amount of time which we allow starting a node to
+ // be unresponsive before marking it unhealty.
+ NodeStartupGracePeriod unversioned.Duration `json:"nodeStartupGracePeriod"`
+ // nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.
+ NodeMonitorPeriod unversioned.Duration `json:"nodeMonitorPeriod"`
+ // serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key
+ // used to sign service account tokens.
+ ServiceAccountKeyFile string `json:"serviceAccountKeyFile"`
+ // enableProfiling enables profiling via web interface host:port/debug/pprof/
+ EnableProfiling bool `json:"enableProfiling"`
+ // clusterName is the instance prefix for the cluster.
+ ClusterName string `json:"clusterName"`
+ // clusterCIDR is CIDR Range for Pods in cluster.
+ ClusterCIDR string `json:"clusterCIDR"`
+ // serviceCIDR is CIDR Range for Services in cluster.
+ ServiceCIDR string `json:"serviceCIDR"`
+ // NodeCIDRMaskSize is the mask size for node cidr in cluster.
+ NodeCIDRMaskSize int32 `json:"nodeCIDRMaskSize"`
+ // allocateNodeCIDRs enables CIDRs for Pods to be allocated and, if
+ // ConfigureCloudRoutes is true, to be set on the cloud provider.
+ AllocateNodeCIDRs bool `json:"allocateNodeCIDRs"`
+ // configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs
+ // to be configured on the cloud provider.
+ ConfigureCloudRoutes bool `json:"configureCloudRoutes"`
+ // rootCAFile is the root certificate authority will be included in service
+ // account's token secret. This must be a valid PEM-encoded CA bundle.
+ RootCAFile string `json:"rootCAFile"`
+ // contentType is contentType of requests sent to apiserver.
+ ContentType string `json:"contentType"`
+ // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
+ KubeAPIQPS float32 `json:"kubeAPIQPS"`
+ // kubeAPIBurst is the burst to use while talking with kubernetes apiserver.
+ KubeAPIBurst int32 `json:"kubeAPIBurst"`
+ // leaderElection defines the configuration of leader election client.
+ LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
+ // volumeConfiguration holds configuration for volume related features.
+ VolumeConfiguration VolumeConfiguration `json:"volumeConfiguration"`
+ // How long to wait between starting controller managers
+ ControllerStartInterval unversioned.Duration `json:"controllerStartInterval"`
+ // enables the generic garbage collector. MUST be synced with the
+ // corresponding flag of the kube-apiserver. WARNING: the generic garbage
+ // collector is an alpha feature.
+ EnableGarbageCollector bool `json:"enableGarbageCollector"`
+}
+
+// VolumeConfiguration contains *all* enumerated flags meant to configure all volume
+// plugins. From this config, the controller-manager binary will create many instances of
+// volume.VolumeConfig, each containing only the configuration needed for that plugin which
+// are then passed to the appropriate plugin. The ControllerManager binary is the only part
+// of the code which knows what plugins are supported and which flags correspond to each plugin.
+type VolumeConfiguration struct {
+ // enableHostPathProvisioning enables HostPath PV provisioning when running without a
+ // cloud provider. This allows testing and development of provisioning features. HostPath
+ // provisioning is not supported in any way, won't work in a multi-node cluster, and
+ // should not be used for anything other than testing or development.
+ EnableHostPathProvisioning bool `json:"enableHostPathProvisioning"`
+ // enableDynamicProvisioning enables the provisioning of volumes when running within an environment
+ // that supports dynamic provisioning. Defaults to true.
+ EnableDynamicProvisioning bool `json:"enableDynamicProvisioning"`
+ // persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.
+ PersistentVolumeRecyclerConfiguration PersistentVolumeRecyclerConfiguration `json:"persitentVolumeRecyclerConfiguration"`
+ // volumePluginDir is the full path of the directory in which the flex
+ // volume plugin should search for additional third party volume plugins
+ FlexVolumePluginDir string `json:"flexVolumePluginDir"`
+}
+
+type PersistentVolumeRecyclerConfiguration struct {
+ // maximumRetry is number of retries the PV recycler will execute on failure to recycle
+ // PV.
+ MaximumRetry int32 `json:"maximumRetry"`
+ // minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler
+ // pod.
+ MinimumTimeoutNFS int32 `json:"minimumTimeoutNFS"`
+ // podTemplateFilePathNFS is the file path to a pod definition used as a template for
+ // NFS persistent volume recycling
+ PodTemplateFilePathNFS string `json:"podTemplateFilePathNFS"`
+ // incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds
+ // for an NFS scrubber pod.
+ IncrementTimeoutNFS int32 `json:"incrementTimeoutNFS"`
+ // podTemplateFilePathHostPath is the file path to a pod definition used as a template for
+ // HostPath persistent volume recycling. This is for development and testing only and
+ // will not work in a multi-node cluster.
+ PodTemplateFilePathHostPath string `json:"podTemplateFilePathHostPath"`
+ // minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath
+ // Recycler pod. This is for development and testing only and will not work in a multi-node
+ // cluster.
+ MinimumTimeoutHostPath int32 `json:"minimumTimeoutHostPath"`
+ // incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds
+ // for a HostPath scrubber pod. This is for development and testing only and will not work
+ // in a multi-node cluster.
+ IncrementTimeoutHostPath int32 `json:"incrementTimeoutHostPath"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/conversion_generated.go
new file mode 100644
index 0000000..160b0f9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/conversion_generated.go
@@ -0,0 +1,182 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ componentconfig "k8s.io/kubernetes/pkg/apis/componentconfig"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration,
+ Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration,
+ Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration,
+ Convert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration,
+ Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration,
+ Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error {
+ SetDefaults_KubeProxyConfiguration(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.BindAddress = in.BindAddress
+ out.ClusterCIDR = in.ClusterCIDR
+ out.HealthzBindAddress = in.HealthzBindAddress
+ out.HealthzPort = in.HealthzPort
+ out.HostnameOverride = in.HostnameOverride
+ out.IPTablesMasqueradeBit = in.IPTablesMasqueradeBit
+ out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
+ out.KubeconfigPath = in.KubeconfigPath
+ out.MasqueradeAll = in.MasqueradeAll
+ out.Master = in.Master
+ out.OOMScoreAdj = in.OOMScoreAdj
+ out.Mode = componentconfig.ProxyMode(in.Mode)
+ out.PortRange = in.PortRange
+ out.ResourceContainer = in.ResourceContainer
+ out.UDPIdleTimeout = in.UDPIdleTimeout
+ out.ConntrackMax = in.ConntrackMax
+ out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
+ return nil
+}
+
+func Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in, out, s)
+}
+
+func autoConvert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in *componentconfig.KubeProxyConfiguration, out *KubeProxyConfiguration, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.BindAddress = in.BindAddress
+ out.ClusterCIDR = in.ClusterCIDR
+ out.HealthzBindAddress = in.HealthzBindAddress
+ out.HealthzPort = in.HealthzPort
+ out.HostnameOverride = in.HostnameOverride
+ out.IPTablesMasqueradeBit = in.IPTablesMasqueradeBit
+ out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
+ out.KubeconfigPath = in.KubeconfigPath
+ out.MasqueradeAll = in.MasqueradeAll
+ out.Master = in.Master
+ out.OOMScoreAdj = in.OOMScoreAdj
+ out.Mode = ProxyMode(in.Mode)
+ out.PortRange = in.PortRange
+ out.ResourceContainer = in.ResourceContainer
+ out.UDPIdleTimeout = in.UDPIdleTimeout
+ out.ConntrackMax = in.ConntrackMax
+ out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
+ return nil
+}
+
+func Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in *componentconfig.KubeProxyConfiguration, out *KubeProxyConfiguration, s conversion.Scope) error {
+ return autoConvert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in, out, s)
+}
+
+func autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *componentconfig.KubeSchedulerConfiguration, s conversion.Scope) error {
+ SetDefaults_KubeSchedulerConfiguration(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Port = int32(in.Port)
+ out.Address = in.Address
+ out.AlgorithmProvider = in.AlgorithmProvider
+ out.PolicyConfigFile = in.PolicyConfigFile
+ if err := api.Convert_Pointer_bool_To_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil {
+ return err
+ }
+ out.ContentType = in.ContentType
+ out.KubeAPIQPS = in.KubeAPIQPS
+ out.KubeAPIBurst = int32(in.KubeAPIBurst)
+ out.SchedulerName = in.SchedulerName
+ out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
+ out.FailureDomains = in.FailureDomains
+ if err := Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *componentconfig.KubeSchedulerConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in, out, s)
+}
+
+func autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *componentconfig.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Port = int(in.Port)
+ out.Address = in.Address
+ out.AlgorithmProvider = in.AlgorithmProvider
+ out.PolicyConfigFile = in.PolicyConfigFile
+ if err := api.Convert_bool_To_Pointer_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil {
+ return err
+ }
+ out.ContentType = in.ContentType
+ out.KubeAPIQPS = in.KubeAPIQPS
+ out.KubeAPIBurst = int(in.KubeAPIBurst)
+ out.SchedulerName = in.SchedulerName
+ out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
+ out.FailureDomains = in.FailureDomains
+ if err := Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *componentconfig.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error {
+ return autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in, out, s)
+}
+
+func autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *componentconfig.LeaderElectionConfiguration, s conversion.Scope) error {
+ SetDefaults_LeaderElectionConfiguration(in)
+ if err := api.Convert_Pointer_bool_To_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil {
+ return err
+ }
+ out.LeaseDuration = in.LeaseDuration
+ out.RenewDeadline = in.RenewDeadline
+ out.RetryPeriod = in.RetryPeriod
+ return nil
+}
+
+func Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *componentconfig.LeaderElectionConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in, out, s)
+}
+
+func autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *componentconfig.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error {
+ if err := api.Convert_bool_To_Pointer_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil {
+ return err
+ }
+ out.LeaseDuration = in.LeaseDuration
+ out.RenewDeadline = in.RenewDeadline
+ out.RetryPeriod = in.RetryPeriod
+ return nil
+}
+
+func Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *componentconfig.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error {
+ return autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..04d9ab0
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1alpha1_KubeProxyConfiguration,
+ DeepCopy_v1alpha1_KubeSchedulerConfiguration,
+ DeepCopy_v1alpha1_LeaderElectionConfiguration,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1alpha1_KubeProxyConfiguration(in KubeProxyConfiguration, out *KubeProxyConfiguration, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.BindAddress = in.BindAddress
+ out.ClusterCIDR = in.ClusterCIDR
+ out.HealthzBindAddress = in.HealthzBindAddress
+ out.HealthzPort = in.HealthzPort
+ out.HostnameOverride = in.HostnameOverride
+ if in.IPTablesMasqueradeBit != nil {
+ in, out := in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.IPTablesMasqueradeBit = nil
+ }
+ out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
+ out.KubeconfigPath = in.KubeconfigPath
+ out.MasqueradeAll = in.MasqueradeAll
+ out.Master = in.Master
+ if in.OOMScoreAdj != nil {
+ in, out := in.OOMScoreAdj, &out.OOMScoreAdj
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.OOMScoreAdj = nil
+ }
+ out.Mode = in.Mode
+ out.PortRange = in.PortRange
+ out.ResourceContainer = in.ResourceContainer
+ out.UDPIdleTimeout = in.UDPIdleTimeout
+ out.ConntrackMax = in.ConntrackMax
+ out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
+ return nil
+}
+
+func DeepCopy_v1alpha1_KubeSchedulerConfiguration(in KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Port = in.Port
+ out.Address = in.Address
+ out.AlgorithmProvider = in.AlgorithmProvider
+ out.PolicyConfigFile = in.PolicyConfigFile
+ if in.EnableProfiling != nil {
+ in, out := in.EnableProfiling, &out.EnableProfiling
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.EnableProfiling = nil
+ }
+ out.ContentType = in.ContentType
+ out.KubeAPIQPS = in.KubeAPIQPS
+ out.KubeAPIBurst = in.KubeAPIBurst
+ out.SchedulerName = in.SchedulerName
+ out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
+ out.FailureDomains = in.FailureDomains
+ if err := DeepCopy_v1alpha1_LeaderElectionConfiguration(in.LeaderElection, &out.LeaderElection, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_LeaderElectionConfiguration(in LeaderElectionConfiguration, out *LeaderElectionConfiguration, c *conversion.Cloner) error {
+ if in.LeaderElect != nil {
+ in, out := in.LeaderElect, &out.LeaderElect
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.LeaderElect = nil
+ }
+ out.LeaseDuration = in.LeaseDuration
+ out.RenewDeadline = in.RenewDeadline
+ out.RetryPeriod = in.RetryPeriod
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go
new file mode 100644
index 0000000..b40b3e4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go
@@ -0,0 +1,114 @@
+/*
+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 v1alpha1
+
+import (
+ "time"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/kubelet/qos"
+ "k8s.io/kubernetes/pkg/master/ports"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_KubeProxyConfiguration,
+ SetDefaults_KubeSchedulerConfiguration,
+ SetDefaults_LeaderElectionConfiguration,
+ )
+}
+
+func SetDefaults_KubeProxyConfiguration(obj *KubeProxyConfiguration) {
+ if obj.BindAddress == "" {
+ obj.BindAddress = "0.0.0.0"
+ }
+ if obj.HealthzPort == 0 {
+ obj.HealthzPort = 10249
+ }
+ if obj.HealthzBindAddress == "" {
+ obj.HealthzBindAddress = "127.0.0.1"
+ }
+ if obj.OOMScoreAdj == nil {
+ temp := int32(qos.KubeProxyOOMScoreAdj)
+ obj.OOMScoreAdj = &temp
+ }
+ if obj.ResourceContainer == "" {
+ obj.ResourceContainer = "/kube-proxy"
+ }
+ if obj.IPTablesSyncPeriod.Duration == 0 {
+ obj.IPTablesSyncPeriod = unversioned.Duration{Duration: 30 * time.Second}
+ }
+ zero := unversioned.Duration{}
+ if obj.UDPIdleTimeout == zero {
+ obj.UDPIdleTimeout = unversioned.Duration{Duration: 250 * time.Millisecond}
+ }
+ if obj.ConntrackMax == 0 {
+ obj.ConntrackMax = 256 * 1024 // 4x default (64k)
+ }
+ if obj.IPTablesMasqueradeBit == nil {
+ temp := int32(14)
+ obj.IPTablesMasqueradeBit = &temp
+ }
+ if obj.ConntrackTCPEstablishedTimeout == zero {
+ obj.ConntrackTCPEstablishedTimeout = unversioned.Duration{Duration: 24 * time.Hour} // 1 day (1/5 default)
+ }
+}
+
+func SetDefaults_KubeSchedulerConfiguration(obj *KubeSchedulerConfiguration) {
+ if obj.Port == 0 {
+ obj.Port = ports.SchedulerPort
+ }
+ if obj.Address == "" {
+ obj.Address = "0.0.0.0"
+ }
+ if obj.AlgorithmProvider == "" {
+ obj.AlgorithmProvider = "DefaultProvider"
+ }
+ if obj.ContentType == "" {
+ obj.ContentType = "application/vnd.kubernetes.protobuf"
+ }
+ if obj.KubeAPIQPS == 0 {
+ obj.KubeAPIQPS = 50.0
+ }
+ if obj.KubeAPIBurst == 0 {
+ obj.KubeAPIBurst = 100
+ }
+ if obj.SchedulerName == "" {
+ obj.SchedulerName = api.DefaultSchedulerName
+ }
+ if obj.HardPodAffinitySymmetricWeight == 0 {
+ obj.HardPodAffinitySymmetricWeight = api.DefaultHardPodAffinitySymmetricWeight
+ }
+ if obj.FailureDomains == "" {
+ obj.FailureDomains = api.DefaultFailureDomains
+ }
+}
+
+func SetDefaults_LeaderElectionConfiguration(obj *LeaderElectionConfiguration) {
+ zero := unversioned.Duration{}
+ if obj.LeaseDuration == zero {
+ obj.LeaseDuration = unversioned.Duration{Duration: 15 * time.Second}
+ }
+ if obj.RenewDeadline == zero {
+ obj.RenewDeadline = unversioned.Duration{Duration: 10 * time.Second}
+ }
+ if obj.RetryPeriod == zero {
+ obj.RetryPeriod = unversioned.Duration{Duration: 2 * time.Second}
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/doc.go
new file mode 100644
index 0000000..621e806
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/componentconfig
+
+package v1alpha1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/register.go
new file mode 100644
index 0000000..17fb52a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/register.go
@@ -0,0 +1,40 @@
+/*
+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 v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "componentconfig"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+}
+
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &KubeProxyConfiguration{},
+ &KubeSchedulerConfiguration{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go
new file mode 100644
index 0000000..817468a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.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 v1alpha1
+
+import "k8s.io/kubernetes/pkg/api/unversioned"
+
+type KubeProxyConfiguration struct {
+ unversioned.TypeMeta
+
+ // bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
+ // for all interfaces)
+ BindAddress string `json:"bindAddress"`
+ // clusterCIDR is the CIDR range of the pods in the cluster. It is used to
+ // bridge traffic coming from outside of the cluster. If not provided,
+ // no off-cluster bridging will be performed.
+ ClusterCIDR string `json:"clusterCIDR"`
+ // healthzBindAddress is the IP address for the health check server to serve on,
+ // defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
+ HealthzBindAddress string `json:"healthzBindAddress"`
+ // healthzPort is the port to bind the health check server. Use 0 to disable.
+ HealthzPort int32 `json:"healthzPort"`
+ // hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
+ HostnameOverride string `json:"hostnameOverride"`
+ // iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
+ // the pure iptables proxy mode. Values must be within the range [0, 31].
+ IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
+ // iptablesSyncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
+ // '2h22m'). Must be greater than 0.
+ IPTablesSyncPeriod unversioned.Duration `json:"iptablesSyncPeriodSeconds"`
+ // kubeconfigPath is the path to the kubeconfig file with authorization information (the
+ // master location is set by the master flag).
+ KubeconfigPath string `json:"kubeconfigPath"`
+ // masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
+ MasqueradeAll bool `json:"masqueradeAll"`
+ // master is the address of the Kubernetes API server (overrides any value in kubeconfig)
+ Master string `json:"master"`
+ // oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
+ // the range [-1000, 1000]
+ OOMScoreAdj *int32 `json:"oomScoreAdj"`
+ // mode specifies which proxy mode to use.
+ Mode ProxyMode `json:"mode"`
+ // portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
+ // in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
+ PortRange string `json:"portRange"`
+ // resourceContainer is the bsolute name of the resource-only container to create and run
+ // the Kube-proxy in (Default: /kube-proxy).
+ ResourceContainer string `json:"resourceContainer"`
+ // udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
+ // Must be greater than 0. Only applicable for proxyMode=userspace.
+ UDPIdleTimeout unversioned.Duration `json:"udpTimeoutMilliseconds"`
+ // conntrackMax is the maximum number of NAT connections to track (0 to leave as-is)")
+ ConntrackMax int32 `json:"conntrackMax"`
+ // conntrackTCPEstablishedTimeout is how long an idle UDP connection will be kept open
+ // (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode is Userspace
+ ConntrackTCPEstablishedTimeout unversioned.Duration `json:"conntrackTCPEstablishedTimeout"`
+}
+
+// Currently two modes of proxying are available: 'userspace' (older, stable) or 'iptables'
+// (experimental). If blank, look at the Node object on the Kubernetes API and respect the
+// 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the
+// best-available proxy (currently userspace, but may change in future versions). If the
+// iptables proxy is selected, regardless of how, but the system's kernel or iptables
+// versions are insufficient, this always falls back to the userspace proxy.
+type ProxyMode string
+
+const (
+ ProxyModeUserspace ProxyMode = "userspace"
+ ProxyModeIPTables ProxyMode = "iptables"
+)
+
+type KubeSchedulerConfiguration struct {
+ unversioned.TypeMeta
+
+ // port is the port that the scheduler's http service runs on.
+ Port int `json:"port"`
+ // address is the IP address to serve on.
+ Address string `json:"address"`
+ // algorithmProvider is the scheduling algorithm provider to use.
+ AlgorithmProvider string `json:"algorithmProvider"`
+ // policyConfigFile is the filepath to the scheduler policy configuration.
+ PolicyConfigFile string `json:"policyConfigFile"`
+ // enableProfiling enables profiling via web interface.
+ EnableProfiling *bool `json:"enableProfiling"`
+ // contentType is contentType of requests sent to apiserver.
+ ContentType string `json:"contentType"`
+ // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
+ KubeAPIQPS float32 `json:"kubeAPIQPS"`
+ // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
+ KubeAPIBurst int `json:"kubeAPIBurst"`
+ // schedulerName is name of the scheduler, used to select which pods
+ // will be processed by this scheduler, based on pod's annotation with
+ // key 'scheduler.alpha.kubernetes.io/name'.
+ SchedulerName string `json:"schedulerName"`
+ // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
+ // corresponding to every RequiredDuringScheduling affinity rule.
+ // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.
+ HardPodAffinitySymmetricWeight int `json:"hardPodAffinitySymmetricWeight"`
+ // Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
+ FailureDomains string `json:"failureDomains"`
+ // leaderElection defines the configuration of leader election client.
+ LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
+}
+
+// LeaderElectionConfiguration defines the configuration of leader election
+// clients for components that can run with leader election enabled.
+type LeaderElectionConfiguration struct {
+ // leaderElect enables a leader election client to gain leadership
+ // before executing the main loop. Enable this when running replicated
+ // components for high availability.
+ LeaderElect *bool `json:"leaderElect"`
+ // leaseDuration is the duration that non-leader candidates will wait
+ // after observing a leadership renewal until attempting to acquire
+ // leadership of a led but unrenewed leader slot. This is effectively the
+ // maximum duration that a leader can be stopped before it is replaced
+ // by another candidate. This is only applicable if leader election is
+ // enabled.
+ LeaseDuration unversioned.Duration `json:"leaseDuration"`
+ // renewDeadline is the interval between attempts by the acting master to
+ // renew a leadership slot before it stops leading. This must be less
+ // than or equal to the lease duration. This is only applicable if leader
+ // election is enabled.
+ RenewDeadline unversioned.Duration `json:"renewDeadline"`
+ // retryPeriod is the duration the clients should wait between attempting
+ // acquisition and renewal of a leadership. This is only applicable if
+ // leader election is enabled.
+ RetryPeriod unversioned.Duration `json:"retryPeriod"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/deep_copy_generated.go
new file mode 100644
index 0000000..d7bbf3b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/deep_copy_generated.go
@@ -0,0 +1,859 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ intstr "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_extensions_APIVersion,
+ DeepCopy_extensions_CustomMetricCurrentStatus,
+ DeepCopy_extensions_CustomMetricCurrentStatusList,
+ DeepCopy_extensions_CustomMetricTarget,
+ DeepCopy_extensions_CustomMetricTargetList,
+ DeepCopy_extensions_DaemonSet,
+ DeepCopy_extensions_DaemonSetList,
+ DeepCopy_extensions_DaemonSetSpec,
+ DeepCopy_extensions_DaemonSetStatus,
+ DeepCopy_extensions_Deployment,
+ DeepCopy_extensions_DeploymentList,
+ DeepCopy_extensions_DeploymentRollback,
+ DeepCopy_extensions_DeploymentSpec,
+ DeepCopy_extensions_DeploymentStatus,
+ DeepCopy_extensions_DeploymentStrategy,
+ DeepCopy_extensions_FSGroupStrategyOptions,
+ DeepCopy_extensions_HTTPIngressPath,
+ DeepCopy_extensions_HTTPIngressRuleValue,
+ DeepCopy_extensions_HostPortRange,
+ DeepCopy_extensions_IDRange,
+ DeepCopy_extensions_Ingress,
+ DeepCopy_extensions_IngressBackend,
+ DeepCopy_extensions_IngressList,
+ DeepCopy_extensions_IngressRule,
+ DeepCopy_extensions_IngressRuleValue,
+ DeepCopy_extensions_IngressSpec,
+ DeepCopy_extensions_IngressStatus,
+ DeepCopy_extensions_IngressTLS,
+ DeepCopy_extensions_NetworkPolicy,
+ DeepCopy_extensions_NetworkPolicyIngressRule,
+ DeepCopy_extensions_NetworkPolicyList,
+ DeepCopy_extensions_NetworkPolicyPeer,
+ DeepCopy_extensions_NetworkPolicyPort,
+ DeepCopy_extensions_NetworkPolicySpec,
+ DeepCopy_extensions_PodSecurityPolicy,
+ DeepCopy_extensions_PodSecurityPolicyList,
+ DeepCopy_extensions_PodSecurityPolicySpec,
+ DeepCopy_extensions_ReplicaSet,
+ DeepCopy_extensions_ReplicaSetList,
+ DeepCopy_extensions_ReplicaSetSpec,
+ DeepCopy_extensions_ReplicaSetStatus,
+ DeepCopy_extensions_ReplicationControllerDummy,
+ DeepCopy_extensions_RollbackConfig,
+ DeepCopy_extensions_RollingUpdateDeployment,
+ DeepCopy_extensions_RunAsUserStrategyOptions,
+ DeepCopy_extensions_SELinuxStrategyOptions,
+ DeepCopy_extensions_Scale,
+ DeepCopy_extensions_ScaleSpec,
+ DeepCopy_extensions_ScaleStatus,
+ DeepCopy_extensions_SupplementalGroupsStrategyOptions,
+ DeepCopy_extensions_ThirdPartyResource,
+ DeepCopy_extensions_ThirdPartyResourceData,
+ DeepCopy_extensions_ThirdPartyResourceDataList,
+ DeepCopy_extensions_ThirdPartyResourceList,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_extensions_APIVersion(in APIVersion, out *APIVersion, c *conversion.Cloner) error {
+ out.Name = in.Name
+ return nil
+}
+
+func DeepCopy_extensions_CustomMetricCurrentStatus(in CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+}
+
+func DeepCopy_extensions_CustomMetricCurrentStatusList(in CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_CustomMetricTarget(in CustomMetricTarget, out *CustomMetricTarget, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+}
+
+func DeepCopy_extensions_CustomMetricTargetList(in CustomMetricTargetList, out *CustomMetricTargetList, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_DaemonSet(in DaemonSet, out *DaemonSet, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DaemonSetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_extensions_DaemonSetList(in DaemonSetList, out *DaemonSetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_extensions_DaemonSet(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_DaemonSetSpec(in DaemonSetSpec, out *DaemonSetSpec, c *conversion.Cloner) error {
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_DaemonSetStatus(in DaemonSetStatus, out *DaemonSetStatus, c *conversion.Cloner) error {
+ out.CurrentNumberScheduled = in.CurrentNumberScheduled
+ out.NumberMisscheduled = in.NumberMisscheduled
+ out.DesiredNumberScheduled = in.DesiredNumberScheduled
+ return nil
+}
+
+func DeepCopy_extensions_Deployment(in Deployment, out *Deployment, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DeploymentSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_extensions_DeploymentList(in DeploymentList, out *DeploymentList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_extensions_Deployment(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_DeploymentRollback(in DeploymentRollback, out *DeploymentRollback, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Name = in.Name
+ if in.UpdatedAnnotations != nil {
+ in, out := in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.UpdatedAnnotations = nil
+ }
+ out.RollbackTo = in.RollbackTo
+ return nil
+}
+
+func DeepCopy_extensions_DeploymentSpec(in DeploymentSpec, out *DeploymentSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ if in.RevisionHistoryLimit != nil {
+ in, out := in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.RevisionHistoryLimit = nil
+ }
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ in, out := in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = *in
+ } else {
+ out.RollbackTo = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_DeploymentStatus(in DeploymentStatus, out *DeploymentStatus, c *conversion.Cloner) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = in.Replicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ return nil
+}
+
+func DeepCopy_extensions_DeploymentStrategy(in DeploymentStrategy, out *DeploymentStrategy, c *conversion.Cloner) error {
+ out.Type = in.Type
+ if in.RollingUpdate != nil {
+ in, out := in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ **out = *in
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_FSGroupStrategyOptions(in FSGroupStrategyOptions, out *FSGroupStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.Ranges != nil {
+ in, out := in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_HTTPIngressPath(in HTTPIngressPath, out *HTTPIngressPath, c *conversion.Cloner) error {
+ out.Path = in.Path
+ out.Backend = in.Backend
+ return nil
+}
+
+func DeepCopy_extensions_HTTPIngressRuleValue(in HTTPIngressRuleValue, out *HTTPIngressRuleValue, c *conversion.Cloner) error {
+ if in.Paths != nil {
+ in, out := in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Paths = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_HostPortRange(in HostPortRange, out *HostPortRange, c *conversion.Cloner) error {
+ out.Min = in.Min
+ out.Max = in.Max
+ return nil
+}
+
+func DeepCopy_extensions_IDRange(in IDRange, out *IDRange, c *conversion.Cloner) error {
+ out.Min = in.Min
+ out.Max = in.Max
+ return nil
+}
+
+func DeepCopy_extensions_Ingress(in Ingress, out *Ingress, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_extensions_IngressBackend(in IngressBackend, out *IngressBackend, c *conversion.Cloner) error {
+ out.ServiceName = in.ServiceName
+ out.ServicePort = in.ServicePort
+ return nil
+}
+
+func DeepCopy_extensions_IngressList(in IngressList, out *IngressList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_IngressRule(in IngressRule, out *IngressRule, c *conversion.Cloner) error {
+ out.Host = in.Host
+ if err := DeepCopy_extensions_IngressRuleValue(in.IngressRuleValue, &out.IngressRuleValue, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_IngressRuleValue(in IngressRuleValue, out *IngressRuleValue, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.HTTP = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_IngressSpec(in IngressSpec, out *IngressSpec, c *conversion.Cloner) error {
+ if in.Backend != nil {
+ in, out := in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ **out = *in
+ } else {
+ out.Backend = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.TLS = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_IngressStatus(in IngressStatus, out *IngressStatus, c *conversion.Cloner) error {
+ if err := api.DeepCopy_api_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_IngressTLS(in IngressTLS, out *IngressTLS, c *conversion.Cloner) error {
+ if in.Hosts != nil {
+ in, out := in.Hosts, &out.Hosts
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Hosts = nil
+ }
+ out.SecretName = in.SecretName
+ return nil
+}
+
+func DeepCopy_extensions_NetworkPolicy(in NetworkPolicy, out *NetworkPolicy, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_NetworkPolicySpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_NetworkPolicyIngressRule(in NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.From = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_NetworkPolicyList(in NetworkPolicyList, out *NetworkPolicyList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_NetworkPolicyPeer(in NetworkPolicyPeer, out *NetworkPolicyPeer, c *conversion.Cloner) error {
+ if in.PodSelector != nil {
+ in, out := in.PodSelector, &out.PodSelector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ in, out := in.NamespaceSelector, &out.NamespaceSelector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_NetworkPolicyPort(in NetworkPolicyPort, out *NetworkPolicyPort, c *conversion.Cloner) error {
+ if in.Protocol != nil {
+ in, out := in.Protocol, &out.Protocol
+ *out = new(api.Protocol)
+ **out = *in
+ } else {
+ out.Protocol = nil
+ }
+ if in.Port != nil {
+ in, out := in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = *in
+ } else {
+ out.Port = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_NetworkPolicySpec(in NetworkPolicySpec, out *NetworkPolicySpec, c *conversion.Cloner) error {
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(in.PodSelector, &out.PodSelector, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_PodSecurityPolicySpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_PodSecurityPolicyList(in PodSecurityPolicyList, out *PodSecurityPolicyList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_extensions_PodSecurityPolicy(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error {
+ out.Privileged = in.Privileged
+ if in.DefaultAddCapabilities != nil {
+ in, out := in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]api.Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.DefaultAddCapabilities = nil
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]api.Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.RequiredDropCapabilities = nil
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]api.Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AllowedCapabilities = nil
+ }
+ if in.Volumes != nil {
+ in, out := in.Volumes, &out.Volumes
+ *out = make([]FSType, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.HostNetwork = in.HostNetwork
+ if in.HostPorts != nil {
+ in, out := in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.HostPorts = nil
+ }
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ 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
+ }
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+func DeepCopy_extensions_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_extensions_ReplicaSetList(in ReplicaSetList, out *ReplicaSetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_extensions_ReplicaSet(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ReplicaSetSpec(in ReplicaSetSpec, out *ReplicaSetSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ReplicaSetStatus(in ReplicaSetStatus, out *ReplicaSetStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func DeepCopy_extensions_ReplicationControllerDummy(in ReplicationControllerDummy, out *ReplicationControllerDummy, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ return nil
+}
+
+func DeepCopy_extensions_RollbackConfig(in RollbackConfig, out *RollbackConfig, c *conversion.Cloner) error {
+ out.Revision = in.Revision
+ return nil
+}
+
+func DeepCopy_extensions_RollingUpdateDeployment(in RollingUpdateDeployment, out *RollingUpdateDeployment, c *conversion.Cloner) error {
+ out.MaxUnavailable = in.MaxUnavailable
+ out.MaxSurge = in.MaxSurge
+ return nil
+}
+
+func DeepCopy_extensions_RunAsUserStrategyOptions(in RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.Ranges != nil {
+ in, out := in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_SELinuxStrategyOptions(in SELinuxStrategyOptions, out *SELinuxStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.SELinuxOptions != nil {
+ in, out := in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api.SELinuxOptions)
+ **out = *in
+ } else {
+ out.SELinuxOptions = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Spec = in.Spec
+ if err := DeepCopy_extensions_ScaleStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ScaleSpec(in ScaleSpec, out *ScaleSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+func DeepCopy_extensions_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.Ranges != nil {
+ in, out := in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Description = in.Description
+ if in.Versions != nil {
+ in, out := in.Versions, &out.Versions
+ *out = make([]APIVersion, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Versions = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ThirdPartyResourceData(in ThirdPartyResourceData, out *ThirdPartyResourceData, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Data != nil {
+ in, out := in.Data, &out.Data
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Data = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ThirdPartyResourceDataList(in ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_extensions_ThirdPartyResourceList(in ThirdPartyResourceList, out *ThirdPartyResourceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go
new file mode 100644
index 0000000..2bbb71d
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go
new file mode 100644
index 0000000..1279dfb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go
@@ -0,0 +1,132 @@
+/*
+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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/extensions"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", extensions.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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(
+ "PodSecurityPolicy",
+ "ThirdPartyResource",
+ )
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1beta1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(extensions.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ extensions.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1beta1.SchemeGroupVersion:
+ v1beta1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go
new file mode 100644
index 0000000..48ba33d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go
@@ -0,0 +1,79 @@
+/*
+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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "extensions"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &autoscaling.HorizontalPodAutoscaler{},
+ &autoscaling.HorizontalPodAutoscalerList{},
+ &batch.Job{},
+ &batch.JobList{},
+ &batch.JobTemplate{},
+ &ReplicationControllerDummy{},
+ &Scale{},
+ &ThirdPartyResource{},
+ &ThirdPartyResourceList{},
+ &DaemonSetList{},
+ &DaemonSet{},
+ &ThirdPartyResourceData{},
+ &ThirdPartyResourceDataList{},
+ &Ingress{},
+ &IngressList{},
+ &api.ListOptions{},
+ &ReplicaSet{},
+ &ReplicaSetList{},
+ &api.ExportOptions{},
+ &PodSecurityPolicy{},
+ &PodSecurityPolicyList{},
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.generated.go
new file mode 100644
index 0000000..fd98234
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.generated.go
@@ -0,0 +1,17991 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 extensions
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_api "k8s.io/kubernetes/pkg/api"
+ pkg4_resource "k8s.io/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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_api.ObjectMeta
+ var v1 pkg4_resource.Quantity
+ var v2 pkg1_unversioned.LabelSelector
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ 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 {
+ x.Replicas = 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 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.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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 *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 != 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)
+ 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 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_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 {
+ 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_unversioned.LabelSelector)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ 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 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.Replicas = 0
+ } else {
+ x.Replicas = 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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_unversioned.LabelSelector)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ScaleSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ScaleStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg4_resource.Quantity{}
+ } else {
+ yyv5 := &x.TargetValue
+ 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 *CustomMetricTarget) 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 {
+ x.Name = string(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.TargetValue = pkg4_resource.Quantity{}
+ } else {
+ yyv9 := &x.TargetValue
+ 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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg4_resource.Quantity{}
+ } else {
+ yyv5 := &x.CurrentValue
+ 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 *CustomMetricCurrentStatus) 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 {
+ x.Name = string(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.CurrentValue = pkg4_resource.Quantity{}
+ } else {
+ yyv9 := &x.CurrentValue
+ 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 *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] = true
+ yyq2[1] = x.Description != ""
+ yyq2[2] = len(x.Versions) != 0
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("description"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("versions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "description":
+ if r.TryDecodeAsNil() {
+ x.Description = ""
+ } else {
+ x.Description = string(r.DecodeString())
+ }
+ case "versions":
+ if r.TryDecodeAsNil() {
+ x.Versions = nil
+ } else {
+ yyv6 := &x.Versions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Description = ""
+ } else {
+ x.Description = string(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.Versions = nil
+ } else {
+ yyv13 := &x.Versions
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceThirdPartyResource((*[]ThirdPartyResource)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Name = string(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 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.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 *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] = true
+ yyq2[1] = len(x.Data) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv5 := &x.Data
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *yyv5 = r.DecodeBytes(*(*[]byte)(yyv5), false, false)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Data = nil
+ } else {
+ yyv11 := &x.Data
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false)
+ }
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = DeploymentSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = DeploymentSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = DeploymentStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [8]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != 0
+ 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
+ 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.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_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)
+ yy10 := &x.Template
+ yy10.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Strategy
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("strategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Strategy
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ 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)
+ yym21 := z.EncBinary()
+ _ = yym21
+ 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 {
+ 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_containerArrayElem1234)
+ if yyq2[6] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ 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)
+ yym29 := z.EncBinary()
+ _ = yym29
+ 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_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() {
+ x.Replicas = 0
+ } else {
+ 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_unversioned.LabelSelector)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv7 := &x.Template
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "strategy":
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv8 := &x.Strategy
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ x.MinReadySeconds = 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)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "paused":
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ x.Paused = bool(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)
+ }
+ 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 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.Replicas = 0
+ } else {
+ x.Replicas = 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_unversioned.LabelSelector)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ 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 = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ 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.Strategy = DeploymentStrategy{}
+ } else {
+ yyv19 := &x.Strategy
+ yyv19.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 {
+ x.MinReadySeconds = 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.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = 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.Paused = false
+ } else {
+ x.Paused = bool(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.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.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 *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[1] = len(x.UpdatedAnnotations) != 0
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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.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.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy10 := &x.RollbackTo
+ yy10.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.RollbackTo
+ 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.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "updatedAnnotations":
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv5 := &x.UpdatedAnnotations
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv5, false, d)
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv7 := &x.RollbackTo
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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 {
+ x.Name = string(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.UpdatedAnnotations = nil
+ } else {
+ yyv12 := &x.UpdatedAnnotations
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, 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.RollbackTo = RollbackConfig{}
+ } else {
+ yyv14 := &x.RollbackTo
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Revision = 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 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.Revision = 0
+ } else {
+ x.Revision = int64(r.DecodeInt(64))
+ }
+ 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 *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 {
+ x.Type = DeploymentStrategyType(r.DecodeString())
+ }
+ 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 {
+ x.Type = DeploymentStrategyType(r.DecodeString())
+ }
+ 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] = 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.MaxUnavailable
+ 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 {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.MaxUnavailable
+ 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] {
+ yy9 := &x.MaxSurge
+ 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)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxSurge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.MaxSurge
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy11)
+ } else {
+ z.EncFallback(yy11)
+ }
+ }
+ }
+ 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() {
+ x.MaxUnavailable = pkg5_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.MaxUnavailable
+ 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 "maxSurge":
+ if r.TryDecodeAsNil() {
+ x.MaxSurge = pkg5_intstr.IntOrString{}
+ } else {
+ yyv6 := &x.MaxSurge
+ 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 *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() {
+ x.MaxUnavailable = pkg5_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.MaxUnavailable
+ 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.MaxSurge = pkg5_intstr.IntOrString{}
+ } else {
+ yyv11 := &x.MaxSurge
+ 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 *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 [5]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.AvailableReplicas != 0
+ yyq2[4] = x.UnavailableReplicas != 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.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.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.UnavailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ }
+ }
+ 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 {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ x.UpdatedReplicas = int32(r.DecodeInt(32))
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ x.AvailableReplicas = int32(r.DecodeInt(32))
+ }
+ case "unavailableReplicas":
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ x.UnavailableReplicas = int32(r.DecodeInt(32))
+ }
+ 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 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.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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.Replicas = 0
+ } else {
+ x.Replicas = 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.UpdatedReplicas = 0
+ } else {
+ x.UpdatedReplicas = 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.AvailableReplicas = 0
+ } else {
+ x.AvailableReplicas = 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.UnavailableReplicas = 0
+ } else {
+ x.UnavailableReplicas = int32(r.DecodeInt(32))
+ }
+ 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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Selector != 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 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_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_unversioned.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 = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv6 := &x.Template
+ yyv6.CodecDecodeSelf(d)
+ }
+ 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 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_unversioned.LabelSelector)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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.Template = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ 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 *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 [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.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_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 {
+ x.CurrentNumberScheduled = int32(r.DecodeInt(32))
+ }
+ case "numberMisscheduled":
+ if r.TryDecodeAsNil() {
+ x.NumberMisscheduled = 0
+ } else {
+ x.NumberMisscheduled = int32(r.DecodeInt(32))
+ }
+ case "desiredNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.DesiredNumberScheduled = 0
+ } else {
+ x.DesiredNumberScheduled = int32(r.DecodeInt(32))
+ }
+ 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 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.CurrentNumberScheduled = 0
+ } else {
+ x.CurrentNumberScheduled = 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.NumberMisscheduled = 0
+ } else {
+ x.NumberMisscheduled = 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.DesiredNumberScheduled = 0
+ } else {
+ x.DesiredNumberScheduled = int32(r.DecodeInt(32))
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = DaemonSetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DaemonSetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = DaemonSetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = DaemonSetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceDaemonSet(([]DaemonSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceDaemonSet((*[]DaemonSet)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceDaemonSet((*[]DaemonSet)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = IngressSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = IngressStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = IngressSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = IngressStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceIngress(([]Ingress)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceIngress((*[]Ingress)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceIngress((*[]Ingress)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.SecretName = string(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 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.Hosts = nil
+ } else {
+ yyv8 := &x.Hosts
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, 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.SecretName = ""
+ } else {
+ x.SecretName = string(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 *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 = pkg2_api.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 = pkg2_api.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 {
+ x.Host = string(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 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.Host = ""
+ } else {
+ x.Host = string(r.DecodeString())
+ }
+ if x.IngressRuleValue.HTTP == nil {
+ x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue)
+ }
+ 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.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.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 *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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "backend":
+ if r.TryDecodeAsNil() {
+ x.Backend = IngressBackend{}
+ } else {
+ yyv5 := &x.Backend
+ yyv5.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 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 {
+ x.Path = string(r.DecodeString())
+ }
+ 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.Backend = IngressBackend{}
+ } else {
+ yyv8 := &x.Backend
+ 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 *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 {
+ x.ServiceName = string(r.DecodeString())
+ }
+ case "servicePort":
+ if r.TryDecodeAsNil() {
+ x.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv5 := &x.ServicePort
+ 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 *IngressBackend) 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.ServiceName = ""
+ } else {
+ x.ServiceName = string(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.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.ServicePort
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicaSetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicaSetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ReplicaSetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ReplicaSetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceReplicaSet((*[]ReplicaSet)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceReplicaSet((*[]ReplicaSet)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Selector != nil
+ 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)
+ 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 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.Template
+ yy10.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Template
+ yy12.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() {
+ x.Replicas = 0
+ } else {
+ 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_unversioned.LabelSelector)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv7 := &x.Template
+ yyv7.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 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 {
+ x.Replicas = 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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_unversioned.LabelSelector)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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.Template = pkg2_api.PodTemplateSpec{}
+ } else {
+ yyv12 := &x.Template
+ 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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ObservedGeneration != 0
+ 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] {
+ 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.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = int32(r.DecodeInt(32))
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 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.Replicas = 0
+ } else {
+ x.Replicas = 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.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = 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.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSecurityPolicySpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Spec = PodSecurityPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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.encSliceapi_Capability(([]pkg2_api.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.encSliceapi_Capability(([]pkg2_api.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.encSliceapi_Capability(([]pkg2_api.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.encSliceapi_Capability(([]pkg2_api.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.encSliceapi_Capability(([]pkg2_api.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.encSliceapi_Capability(([]pkg2_api.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 {
+ x.Privileged = bool(r.DecodeBool())
+ }
+ case "defaultAddCapabilities":
+ if r.TryDecodeAsNil() {
+ x.DefaultAddCapabilities = nil
+ } else {
+ yyv5 := &x.DefaultAddCapabilities
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv5), d)
+ }
+ }
+ case "requiredDropCapabilities":
+ if r.TryDecodeAsNil() {
+ x.RequiredDropCapabilities = nil
+ } else {
+ yyv7 := &x.RequiredDropCapabilities
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv7), d)
+ }
+ }
+ case "allowedCapabilities":
+ if r.TryDecodeAsNil() {
+ x.AllowedCapabilities = nil
+ } else {
+ yyv9 := &x.AllowedCapabilities
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv9), d)
+ }
+ }
+ case "volumes":
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv11 := &x.Volumes
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv11), d)
+ }
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(r.DecodeBool())
+ }
+ case "hostPorts":
+ if r.TryDecodeAsNil() {
+ x.HostPorts = nil
+ } else {
+ yyv14 := &x.HostPorts
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv14), d)
+ }
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ x.HostPID = bool(r.DecodeBool())
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ x.HostIPC = bool(r.DecodeBool())
+ }
+ case "seLinux":
+ if r.TryDecodeAsNil() {
+ x.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv18 := &x.SELinux
+ yyv18.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ x.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv19 := &x.RunAsUser
+ yyv19.CodecDecodeSelf(d)
+ }
+ case "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv20 := &x.SupplementalGroups
+ yyv20.CodecDecodeSelf(d)
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ x.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv21 := &x.FSGroup
+ yyv21.CodecDecodeSelf(d)
+ }
+ case "readOnlyRootFilesystem":
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyRootFilesystem = false
+ } else {
+ x.ReadOnlyRootFilesystem = bool(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 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.Privileged = false
+ } else {
+ x.Privileged = bool(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.DefaultAddCapabilities = nil
+ } else {
+ yyv25 := &x.DefaultAddCapabilities
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv25), 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.RequiredDropCapabilities = nil
+ } else {
+ yyv27 := &x.RequiredDropCapabilities
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv27), 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.AllowedCapabilities = nil
+ } else {
+ yyv29 := &x.AllowedCapabilities
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv29), 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.Volumes = nil
+ } else {
+ yyv31 := &x.Volumes
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv31), 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.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(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.HostPorts = nil
+ } else {
+ yyv34 := &x.HostPorts
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv34), 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.HostPID = false
+ } else {
+ x.HostPID = bool(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.HostIPC = false
+ } else {
+ x.HostIPC = bool(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.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv38 := &x.SELinux
+ yyv38.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.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv39 := &x.RunAsUser
+ yyv39.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.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv40 := &x.SupplementalGroups
+ 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.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv41 := &x.FSGroup
+ yyv41.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.ReadOnlyRootFilesystem = false
+ } else {
+ x.ReadOnlyRootFilesystem = bool(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 *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 {
+ x.Min = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ x.Max = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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 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.Min = 0
+ } else {
+ x.Min = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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.Max = 0
+ } else {
+ x.Max = int(r.DecodeInt(codecSelferBitsize1234))
+ }
+ 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 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 *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 {
+ x.Rule = SELinuxStrategy(r.DecodeString())
+ }
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(pkg2_api.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 {
+ x.Rule = SELinuxStrategy(r.DecodeString())
+ }
+ 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(pkg2_api.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 {
+ x.Rule = RunAsUserStrategy(r.DecodeString())
+ }
+ 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 {
+ x.Rule = RunAsUserStrategy(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.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 {
+ x.Min = int64(r.DecodeInt(64))
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ x.Max = 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 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.Min = 0
+ } else {
+ x.Min = int64(r.DecodeInt(64))
+ }
+ 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.Max = 0
+ } else {
+ x.Max = 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 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 {
+ x.Rule = FSGroupStrategyType(r.DecodeString())
+ }
+ 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 {
+ x.Rule = FSGroupStrategyType(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.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 {
+ x.Rule = SupplementalGroupsStrategyType(r.DecodeString())
+ }
+ 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 {
+ x.Rule = SupplementalGroupsStrategyType(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.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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = NetworkPolicySpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_api.ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Spec = NetworkPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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_unversioned.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_unversioned.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(pkg2_api.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(pkg2_api.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_unversioned.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_unversioned.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_unversioned.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_unversioned.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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 280)
+ 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) 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, 768)
+ 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, 696)
+ 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, 264)
+ 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, 320)
+ 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, 704)
+ 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) encSliceapi_Capability(v []pkg2_api.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) decSliceapi_Capability(v *[]pkg2_api.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 = []pkg2_api.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([]pkg2_api.Capability, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_api.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 {
+ yyv1[yyj1] = pkg2_api.Capability(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = pkg2_api.Capability(r.DecodeString())
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 pkg2_api.Capability
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = pkg2_api.Capability(r.DecodeString())
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg2_api.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 {
+ yyv1[yyj1] = FSType(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = FSType(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = FSType(r.DecodeString())
+ }
+
+ } 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, 16)
+ 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, 536)
+ 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, 296)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go
new file mode 100644
index 0000000..8c73db7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go
@@ -0,0 +1,901 @@
+/*
+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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ Replicas int32 `json:"replicas,omitempty"`
+}
+
+// represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas"`
+
+ // label query over pods that should match the replicas count.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// represents a scaling request for a resource.
+type Scale struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec ScaleSpec `json:"spec,omitempty"`
+
+ // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
+ Status ScaleStatus `json:"status,omitempty"`
+}
+
+// Dummy definition
+type ReplicationControllerDummy struct {
+ unversioned.TypeMeta `json:",inline"`
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+type CustomMetricTarget struct {
+ // Custom Metric name.
+ Name string `json:"name"`
+ // Custom Metric value (average).
+ TargetValue resource.Quantity `json:"value"`
+}
+
+type CustomMetricTargetList struct {
+ Items []CustomMetricTarget `json:"items"`
+}
+
+type CustomMetricCurrentStatus struct {
+ // Custom Metric name.
+ Name string `json:"name"`
+ // Custom Metric value (average).
+ CurrentValue resource.Quantity `json:"value"`
+}
+
+type CustomMetricCurrentStatusList struct {
+ Items []CustomMetricCurrentStatus `json:"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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Standard object metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Description is the description of this object.
+ Description string `json:"description,omitempty"`
+
+ // Versions are versions for this third party object
+ Versions []APIVersion `json:"versions,omitempty"`
+}
+
+type ThirdPartyResourceList struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is the list of horizontal pod autoscalers.
+ Items []ThirdPartyResource `json:"items"`
+}
+
+// An APIVersion represents a single concrete version of an object model.
+// TODO: we should consider merge this struct with GroupVersion in unversioned.go
+type APIVersion struct {
+ // Name of this version (e.g. 'v1').
+ Name string `json:"name,omitempty"`
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+type ThirdPartyResourceData struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Data is the raw JSON data for this data.
+ Data []byte `json:"data,omitempty"`
+}
+
+// +genclient=true
+
+type Deployment struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Specification of the desired behavior of the Deployment.
+ Spec DeploymentSpec `json:"spec,omitempty"`
+
+ // Most recently observed status of the Deployment.
+ Status DeploymentStatus `json:"status,omitempty"`
+}
+
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ Replicas int32 `json:"replicas,omitempty"`
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+
+ // Template describes the pods that will be created.
+ Template api.PodTemplateSpec `json:"template"`
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ Strategy DeploymentStrategy `json:"strategy,omitempty"`
+
+ // 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)
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ Paused bool `json:"paused,omitempty"`
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ RollbackTo *RollbackConfig `json:"rollbackTo,omitempty"`
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Required: This must match the Name of a deployment.
+ Name string `json:"name"`
+ // The annotations to be updated to a deployment
+ UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty"`
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig `json:"rollbackTo"`
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollbck to the last revision.
+ Revision int64 `json:"revision,omitempty"`
+}
+
+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.
+ Type DeploymentStrategyType `json:"type,omitempty"`
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
+}
+
+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 up.
+ // 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.
+ MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
+
+ // 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.
+ MaxSurge intstr.IntOrString `json:"maxSurge,omitempty"`
+}
+
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ Replicas int32 `json:"replicas,omitempty"`
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ AvailableReplicas int32 `json:"availableReplicas,omitempty"`
+
+ // Total number of unavailable pods targeted by this deployment.
+ UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`
+}
+
+type DeploymentList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is the list of deployments.
+ Items []Deployment `json:"items"`
+}
+
+// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
+/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out.
+type DaemonSetUpdateStrategy struct {
+ // Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
+ Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
+
+ // Rolling update config params. Present only if DaemonSetUpdateStrategy =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as DeploymentStrategy.RollingUpdate.
+ RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
+}
+
+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"
+)
+
+// 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%, 30% of the currently running DaemonSet
+ // pods can be stopped for an update at any given time. The update starts
+ // by stopping at most 30% of the currently running DaemonSet pods and then
+ // brings up new DaemonSet pods in their place. Once the new pods are ready,
+ // 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.
+ MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
+
+ // 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).
+ MinReadySeconds int `json:"minReadySeconds,omitempty"`
+}
+*/
+
+// DaemonSetSpec is the specification of a daemon set.
+type DaemonSetSpec struct {
+ // Selector is 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+
+ // Template is the 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ Template api.PodTemplateSpec `json:"template"`
+
+ // TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
+ /* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out.
+ // Update strategy to replace existing DaemonSet pods with new pods.
+ UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
+
+ // Label key that is added to DaemonSet pods to distinguish between old and
+ // new pod templates during DaemonSet update.
+ // Users can set this to an empty string to indicate that the system should
+ // not add any label. If unspecified, system uses
+ // DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash").
+ // Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
+ // No label is added if this is set to empty string.
+ UniqueLabelKey string `json:"uniqueLabelKey,omitempty"`
+ */
+}
+
+const (
+ // DefaultDaemonSetUniqueLabelKey is the default key of the labels that is added
+ // to daemon set pods to distinguish between old and new pod templates during
+ // DaemonSet update. See DaemonSetSpec's UniqueLabelKey field for more information.
+ DefaultDaemonSetUniqueLabelKey string = "daemonset.kubernetes.io/podTemplateHash"
+)
+
+// DaemonSetStatus represents the current status of a daemon set.
+type DaemonSetStatus struct {
+ // CurrentNumberScheduled is the number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ CurrentNumberScheduled int32 `json:"currentNumberScheduled"`
+
+ // NumberMisscheduled is the number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ NumberMisscheduled int32 `json:"numberMisscheduled"`
+
+ // DesiredNumberScheduled is the total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ DesiredNumberScheduled int32 `json:"desiredNumberScheduled"`
+}
+
+// +genclient=true
+
+// DaemonSet represents the configuration of a daemon set.
+type DaemonSet struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the desired behavior of this daemon set.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec DaemonSetSpec `json:"spec,omitempty"`
+
+ // Status is 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status DaemonSetStatus `json:"status,omitempty"`
+}
+
+// DaemonSetList is a collection of daemon sets.
+type DaemonSetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is a list of daemon sets.
+ Items []DaemonSet `json:"items"`
+}
+
+type ThirdPartyResourceDataList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty"`
+ // Items is a list of third party objects
+ Items []ThirdPartyResourceData `json:"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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec is the desired state of the Ingress.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec IngressSpec `json:"spec,omitempty"`
+
+ // Status is the current state of the Ingress.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status IngressStatus `json:"status,omitempty"`
+}
+
+// IngressList is a collection of Ingress.
+type IngressList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ // Items is the list of Ingress.
+ Items []Ingress `json:"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.
+ Backend *IngressBackend `json:"backend,omitempty"`
+
+ // 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.
+ TLS []IngressTLS `json:"tls,omitempty"`
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ Rules []IngressRule `json:"rules,omitempty"`
+ // 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.
+ Hosts []string `json:"hosts,omitempty"`
+ // 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.
+ SecretName string `json:"secretName,omitempty"`
+ // 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.
+ LoadBalancer api.LoadBalancerStatus `json:"loadBalancer,omitempty"`
+}
+
+// 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.
+ Host string `json:"host,omitempty"`
+ // 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.
+ IngressRuleValue `json:",inline,omitempty"`
+}
+
+// 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.
+
+ HTTP *HTTPIngressRuleValue `json:"http,omitempty"`
+}
+
+// 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"`
+ // 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 a 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.
+ Path string `json:"path,omitempty"`
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ Backend IngressBackend `json:"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"`
+
+ // Specifies the port of the referenced service.
+ ServicePort intstr.IntOrString `json:"servicePort"`
+}
+
+// +genclient=true
+
+// ReplicaSet represents the configuration of a replica set.
+type ReplicaSet struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the desired behavior of this ReplicaSet.
+ Spec ReplicaSetSpec `json:"spec,omitempty"`
+
+ // Status is the current status of this ReplicaSet. This data may be
+ // out of date by some window of time.
+ Status ReplicaSetStatus `json:"status,omitempty"`
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+type ReplicaSetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []ReplicaSet `json:"items"`
+}
+
+// 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 `json:"replicas"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ Template api.PodTemplateSpec `json:"template,omitempty"`
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+type ReplicaSetStatus struct {
+ // Replicas is the number of actual replicas.
+ Replicas int32 `json:"replicas"`
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
+
+ // ObservedGeneration is the most recent generation observed by the controller.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
+}
+
+// +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 {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec defines the policy enforced.
+ Spec PodSecurityPolicySpec `json:"spec,omitempty"`
+}
+
+// PodSecurityPolicySpec defines the policy enforced.
+type PodSecurityPolicySpec struct {
+ // Privileged determines if a pod can request to be run as privileged.
+ Privileged bool `json:"privileged,omitempty"`
+ // 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.
+ DefaultAddCapabilities []api.Capability `json:"defaultAddCapabilities,omitempty"`
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ RequiredDropCapabilities []api.Capability `json:"requiredDropCapabilities,omitempty"`
+ // 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.
+ AllowedCapabilities []api.Capability `json:"allowedCapabilities,omitempty"`
+ // Volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ Volumes []FSType `json:"volumes,omitempty"`
+ // HostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ HostNetwork bool `json:"hostNetwork,omitempty"`
+ // HostPorts determines which host port ranges are allowed to be exposed.
+ HostPorts []HostPortRange `json:"hostPorts,omitempty"`
+ // HostPID determines if the policy allows the use of HostPID in the pod spec.
+ HostPID bool `json:"hostPID,omitempty"`
+ // HostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ HostIPC bool `json:"hostIPC,omitempty"`
+ // SELinux is the strategy that will dictate the allowable labels that may be set.
+ SELinux SELinuxStrategyOptions `json:"seLinux"`
+ // RunAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ RunAsUser RunAsUserStrategyOptions `json:"runAsUser"`
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups"`
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ FSGroup FSGroupStrategyOptions `json:"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.
+ ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
+}
+
+// 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 `json:"min"`
+ // Max is the end of the range, inclusive.
+ Max int `json:"max"`
+}
+
+// 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"
+ 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 `json:"rule"`
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
+ SELinuxOptions *api.SELinuxOptions `json:"seLinuxOptions,omitempty"`
+}
+
+// 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 `json:"rule"`
+ // Ranges are the allowed ranges of uids that may be used.
+ Ranges []IDRange `json:"ranges,omitempty"`
+}
+
+// IDRange 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"`
+ // Max is the end of the range, inclusive.
+ Max int64 `json:"max"`
+}
+
+// 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.
+ Rule FSGroupStrategyType `json:"rule,omitempty"`
+ // 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.
+ Ranges []IDRange `json:"ranges,omitempty"`
+}
+
+// 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.
+ Rule SupplementalGroupsStrategyType `json:"rule,omitempty"`
+ // 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.
+ Ranges []IDRange `json:"ranges,omitempty"`
+}
+
+// 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 {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []PodSecurityPolicy `json:"items"`
+}
+
+type NetworkPolicy struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ Spec NetworkPolicySpec `json:"spec,omitempty"`
+}
+
+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 unversioned.LabelSelector `json:"podSelector"`
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it,
+ // 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 affect ingress isolation.
+ // If this field is present and contains at least one rule, this policy allows any traffic
+ // which matches at least one of the ingress rules in this list.
+ Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty"`
+}
+
+// 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 not provided, this rule matches all ports (traffic not restricted by port).
+ // If this field is empty, this rule matches no ports (no traffic matches).
+ // 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.
+ // TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
+ Ports []NetworkPolicyPort `json:"ports,omitempty"`
+
+ // 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 not provided, this rule matches all sources (traffic not restricted by source).
+ // If this field is empty, this rule matches no sources (no traffic matches).
+ // 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.
+ // TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
+ From []NetworkPolicyPeer `json:"from,omitempty"`
+}
+
+type NetworkPolicyPort struct {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ Protocol *api.Protocol `json:"protocol,omitempty"`
+
+ // 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.
+ Port *intstr.IntOrString `json:"port,omitempty"`
+}
+
+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 not provided, this selector selects no pods.
+ // If present but empty, this selector selects all pods in this namespace.
+ PodSelector *unversioned.LabelSelector `json:"podSelector,omitempty"`
+
+ // 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 omitted, this selector selects no namespaces.
+ // If present but empty, this selector selects all namespaces.
+ NamespaceSelector *unversioned.LabelSelector `json:"namespaceSelector,omitempty"`
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+
+ Items []NetworkPolicy `json:"items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go
new file mode 100644
index 0000000..d685ebf
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go
@@ -0,0 +1,404 @@
+/*
+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"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) {
+ // 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_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec,
+ Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec,
+ // autoscaling
+ Convert_autoscaling_CrossVersionObjectReference_To_v1beta1_SubresourceReference,
+ Convert_v1beta1_SubresourceReference_To_autoscaling_CrossVersionObjectReference,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec,
+ Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ // batch
+ Convert_batch_JobSpec_To_v1beta1_JobSpec,
+ Convert_v1beta1_JobSpec_To_batch_JobSpec,
+ )
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, kind := range []string{"DaemonSet", "Deployment", "Ingress"} {
+ err = api.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 {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+ }
+
+ err = api.Scheme.AddFieldLabelConversionFunc("extensions/v1beta1", "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 not supported: %s", label)
+ }
+ })
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+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 := unversioned.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 := unversioned.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(unversioned.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
+ if in.Selector != nil {
+ out.Selector = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ }
+ 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
+ }
+
+ if in.Selector != nil {
+ out.Selector = new(unversioned.LabelSelector)
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ 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
+ }
+ 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_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = int32(in.Replicas)
+ if in.Selector != nil {
+ out.Selector = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+
+ 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
+ }
+ if in.Selector != nil {
+ out.Selector = new(unversioned.LabelSelector)
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_batch_JobSpec_To_v1beta1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1beta1.LabelSelector
+ if in.Selector != nil {
+ out.Selector = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+
+ // BEGIN non-standard conversion
+ // autoSelector has opposite meaning as manualSelector.
+ // in both cases, unset means false, and unset is always preferred to false.
+ // unset vs set-false distinction is not preserved.
+ manualSelector := in.ManualSelector != nil && *in.ManualSelector
+ autoSelector := !manualSelector
+ if autoSelector {
+ out.AutoSelector = new(bool)
+ *out.AutoSelector = true
+ } else {
+ out.AutoSelector = nil
+ }
+ // END non-standard conversion
+
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_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
+ // unable to generate simple pointer conversion for v1beta1.LabelSelector -> unversioned.LabelSelector
+ if in.Selector != nil {
+ out.Selector = new(unversioned.LabelSelector)
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+
+ // BEGIN non-standard conversion
+ // autoSelector has opposite meaning as manualSelector.
+ // in both cases, unset means false, and unset is always preferred to false.
+ // unset vs set-false distinction is not preserved.
+ autoSelector := bool(in.AutoSelector != nil && *in.AutoSelector)
+ manualSelector := !autoSelector
+ if manualSelector {
+ out.ManualSelector = new(bool)
+ *out.ManualSelector = true
+ } else {
+ out.ManualSelector = nil
+ }
+ // END non-standard conversion
+
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_autoscaling_CrossVersionObjectReference_To_v1beta1_SubresourceReference(in *autoscaling.CrossVersionObjectReference, out *SubresourceReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ out.Subresource = "scale"
+ return nil
+}
+
+func Convert_v1beta1_SubresourceReference_To_autoscaling_CrossVersionObjectReference(in *SubresourceReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1beta1_SubresourceReference(&in.ScaleTargetRef, &out.ScaleRef, s); err != nil {
+ return err
+ }
+ if in.MinReplicas != nil {
+ out.MinReplicas = new(int32)
+ *out.MinReplicas = *in.MinReplicas
+ } else {
+ out.MinReplicas = nil
+ }
+ out.MaxReplicas = in.MaxReplicas
+ if in.TargetCPUUtilizationPercentage != nil {
+ out.CPUUtilization = &CPUTargetUtilization{TargetPercentage: *in.TargetCPUUtilizationPercentage}
+ }
+ return nil
+}
+
+func Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v1beta1_SubresourceReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ if in.MinReplicas != nil {
+ out.MinReplicas = new(int32)
+ *out.MinReplicas = int32(*in.MinReplicas)
+ } else {
+ out.MinReplicas = nil
+ }
+ out.MaxReplicas = int32(in.MaxReplicas)
+ if in.CPUUtilization != nil {
+ out.TargetCPUUtilizationPercentage = new(int32)
+ *out.TargetCPUUtilizationPercentage = int32(in.CPUUtilization.TargetPercentage)
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go
new file mode 100644
index 0000000..6f4ff53
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion_generated.go
@@ -0,0 +1,2539 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
+ batch "k8s.io/kubernetes/pkg/apis/batch"
+ extensions "k8s.io/kubernetes/pkg/apis/extensions"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.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_Deployment_To_extensions_Deployment,
+ Convert_extensions_Deployment_To_v1beta1_Deployment,
+ 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_ExportOptions_To_api_ExportOptions,
+ Convert_api_ExportOptions_To_v1beta1_ExportOptions,
+ 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_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler,
+ Convert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList,
+ Convert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList,
+ Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec,
+ Convert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus,
+ Convert_v1beta1_HostPortRange_To_extensions_HostPortRange,
+ Convert_extensions_HostPortRange_To_v1beta1_HostPortRange,
+ Convert_v1beta1_IDRange_To_extensions_IDRange,
+ Convert_extensions_IDRange_To_v1beta1_IDRange,
+ 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_Job_To_batch_Job,
+ Convert_batch_Job_To_v1beta1_Job,
+ Convert_v1beta1_JobCondition_To_batch_JobCondition,
+ Convert_batch_JobCondition_To_v1beta1_JobCondition,
+ Convert_v1beta1_JobList_To_batch_JobList,
+ Convert_batch_JobList_To_v1beta1_JobList,
+ Convert_v1beta1_JobSpec_To_batch_JobSpec,
+ Convert_batch_JobSpec_To_v1beta1_JobSpec,
+ Convert_v1beta1_JobStatus_To_batch_JobStatus,
+ Convert_batch_JobStatus_To_v1beta1_JobStatus,
+ Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector,
+ Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector,
+ Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
+ Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement,
+ Convert_v1beta1_ListOptions_To_api_ListOptions,
+ Convert_api_ListOptions_To_v1beta1_ListOptions,
+ 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_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_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,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+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
+}
+
+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
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.CurrentValue, &out.CurrentValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.CurrentValue, &out.CurrentValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.CustomMetricCurrentStatus, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricCurrentStatus, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.TargetValue, &out.TargetValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.TargetValue, &out.TargetValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.CustomMetricTarget, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricTarget, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ SetDefaults_DaemonSet(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+ return nil
+}
+
+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
+ return nil
+}
+
+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_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error {
+ SetDefaults_Deployment(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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_DeploymentList_To_extensions_DeploymentList(in *DeploymentList, out *extensions.DeploymentList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Name = in.Name
+ out.UpdatedAnnotations = in.UpdatedAnnotations
+ if err := Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Name = in.Name
+ out.UpdatedAnnotations = in.UpdatedAnnotations
+ if err := Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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_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.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ return nil
+}
+
+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.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ return nil
+}
+
+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_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func Convert_v1beta1_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_ExportOptions_To_api_ExportOptions(in, out, s)
+}
+
+func autoConvert_api_ExportOptions_To_v1beta1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func Convert_api_ExportOptions_To_v1beta1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error {
+ return autoConvert_api_ExportOptions_To_v1beta1_ExportOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.FSGroupStrategyType(in.Rule)
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]extensions.IDRange, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+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)
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]extensions.HTTPIngressPath, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Paths = nil
+ }
+ return nil
+}
+
+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 {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Paths = nil
+ }
+ return nil
+}
+
+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_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ SetDefaults_HorizontalPodAutoscaler(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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_v1beta1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_v1beta1_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
+ out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage
+ return nil
+}
+
+func Convert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_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
+ out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(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
+}
+
+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
+}
+
+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_IDRange_To_extensions_IDRange(in *IDRange, out *extensions.IDRange, s conversion.Scope) error {
+ out.Min = in.Min
+ out.Max = in.Max
+ return nil
+}
+
+func Convert_v1beta1_IDRange_To_extensions_IDRange(in *IDRange, out *extensions.IDRange, s conversion.Scope) error {
+ return autoConvert_v1beta1_IDRange_To_extensions_IDRange(in, out, s)
+}
+
+func autoConvert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out *IDRange, s conversion.Scope) error {
+ out.Min = in.Min
+ out.Max = in.Max
+ return nil
+}
+
+func Convert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out *IDRange, s conversion.Scope) error {
+ return autoConvert_extensions_IDRange_To_v1beta1_IDRange(in, out, s)
+}
+
+func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.ServicePort, &out.ServicePort, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.ServicePort, &out.ServicePort, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.Ingress, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_Ingress_To_extensions_Ingress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Ingress, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_Ingress_To_v1beta1_Ingress(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 {
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(extensions.HTTPIngressRuleValue)
+ if err := Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HTTP = nil
+ }
+ return nil
+}
+
+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 {
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(HTTPIngressRuleValue)
+ if err := Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.HTTP = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Backend != nil {
+ in, out := &in.Backend, &out.Backend
+ *out = new(extensions.IngressBackend)
+ if err := Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Backend = nil
+ }
+ if in.TLS != nil {
+ in, out := &in.TLS, &out.TLS
+ *out = make([]extensions.IngressTLS, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_IngressTLS_To_extensions_IngressTLS(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.TLS = nil
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]extensions.IngressRule, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_IngressRule_To_extensions_IngressRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Backend != nil {
+ in, out := &in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ if err := Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Backend = nil
+ }
+ if in.TLS != nil {
+ in, out := &in.TLS, &out.TLS
+ *out = make([]IngressTLS, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.TLS = nil
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]IngressRule, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_IngressRule_To_v1beta1_IngressRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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 = in.Hosts
+ out.SecretName = in.SecretName
+ return nil
+}
+
+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 = in.Hosts
+ out.SecretName = in.SecretName
+ return nil
+}
+
+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_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ SetDefaults_Job(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ return autoConvert_v1beta1_Job_To_batch_Job(in, out, s)
+}
+
+func autoConvert_batch_Job_To_v1beta1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobSpec_To_v1beta1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobStatus_To_v1beta1_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_batch_Job_To_v1beta1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ return autoConvert_batch_Job_To_v1beta1_Job(in, out, s)
+}
+
+func autoConvert_v1beta1_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)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func Convert_v1beta1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_JobCondition_To_batch_JobCondition(in, out, s)
+}
+
+func autoConvert_batch_JobCondition_To_v1beta1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ out.Type = JobConditionType(in.Type)
+ out.Status = v1.ConditionStatus(in.Status)
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func Convert_batch_JobCondition_To_v1beta1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ return autoConvert_batch_JobCondition_To_v1beta1_JobCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.Job, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ return autoConvert_v1beta1_JobList_To_batch_JobList(in, out, s)
+}
+
+func autoConvert_batch_JobList_To_v1beta1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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_v1beta1_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_batch_JobList_To_v1beta1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ return autoConvert_batch_JobList_To_v1beta1_JobList(in, out, s)
+}
+
+func autoConvert_v1beta1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]batch.JobCondition, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.StartTime = in.StartTime
+ out.CompletionTime = in.CompletionTime
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func Convert_v1beta1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_JobStatus_To_batch_JobStatus(in, out, s)
+}
+
+func autoConvert_batch_JobStatus_To_v1beta1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := Convert_batch_JobCondition_To_v1beta1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ out.StartTime = in.StartTime
+ out.CompletionTime = in.CompletionTime
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func Convert_batch_JobStatus_To_v1beta1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ return autoConvert_batch_JobStatus_To_v1beta1_JobStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
+ out.MatchLabels = in.MatchLabels
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]unversioned.LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error {
+ return autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in, out, s)
+}
+
+func autoConvert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error {
+ out.MatchLabels = in.MatchLabels
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error {
+ return autoConvert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in, out, s)
+}
+
+func autoConvert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = unversioned.LabelSelectorOperator(in.Operator)
+ out.Values = in.Values
+ return nil
+}
+
+func Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in, out, s)
+}
+
+func autoConvert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = LabelSelectorOperator(in.Operator)
+ out.Values = in.Values
+ return nil
+}
+
+func Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in, out, s)
+}
+
+func autoConvert_v1beta1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := api.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = in.TimeoutSeconds
+ return nil
+}
+
+func Convert_v1beta1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_ListOptions_To_api_ListOptions(in, out, s)
+}
+
+func autoConvert_api_ListOptions_To_v1beta1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := api.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = in.TimeoutSeconds
+ return nil
+}
+
+func Convert_api_ListOptions_To_v1beta1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
+ return autoConvert_api_ListOptions_To_v1beta1_ListOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ SetDefaults_NetworkPolicy(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]extensions.NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]extensions.NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.From = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.From = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ *out = new(unversioned.LabelSelector)
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ *out = new(unversioned.LabelSelector)
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+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 {
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ *out = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ *out = new(LabelSelector)
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+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 {
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api.Protocol)
+ **out = api.Protocol(**in)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+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 {
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(v1.Protocol)
+ **out = v1.Protocol(**in)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+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 {
+ if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(&in.PodSelector, &out.PodSelector, s); err != nil {
+ return err
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]extensions.NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+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 {
+ if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(&in.PodSelector, &out.PodSelector, s); err != nil {
+ return err
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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
+ if in.DefaultAddCapabilities != nil {
+ in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]api.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = api.Capability((*in)[i])
+ }
+ } else {
+ out.DefaultAddCapabilities = nil
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]api.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = api.Capability((*in)[i])
+ }
+ } else {
+ out.RequiredDropCapabilities = nil
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]api.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = api.Capability((*in)[i])
+ }
+ } else {
+ out.AllowedCapabilities = nil
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]extensions.FSType, len(*in))
+ for i := range *in {
+ (*out)[i] = extensions.FSType((*in)[i])
+ }
+ } else {
+ out.Volumes = nil
+ }
+ 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
+}
+
+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
+ if in.DefaultAddCapabilities != nil {
+ in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]v1.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = v1.Capability((*in)[i])
+ }
+ } else {
+ out.DefaultAddCapabilities = nil
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]v1.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = v1.Capability((*in)[i])
+ }
+ } else {
+ out.RequiredDropCapabilities = nil
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]v1.Capability, len(*in))
+ for i := range *in {
+ (*out)[i] = v1.Capability((*in)[i])
+ }
+ } else {
+ out.AllowedCapabilities = nil
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]FSType, len(*in))
+ for i := range *in {
+ (*out)[i] = FSType((*in)[i])
+ }
+ } else {
+ out.Volumes = nil
+ }
+ 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
+}
+
+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 {
+ SetDefaults_ReplicaSet(in)
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+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.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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
+}
+
+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
+}
+
+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_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.RunAsUserStrategy(in.Rule)
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]extensions.IDRange, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+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)
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+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)
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api.SELinuxOptions)
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(*in, *out, 0); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ return nil
+}
+
+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)
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(v1.SELinuxOptions)
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(*in, *out, 0); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+}
+
+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
+}
+
+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
+}
+
+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_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.SupplementalGroupsStrategyType(in.Rule)
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]extensions.IDRange, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+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)
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ out.Description = in.Description
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]extensions.APIVersion, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_APIVersion_To_extensions_APIVersion(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Versions = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ out.Description = in.Description
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]APIVersion, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_APIVersion_To_v1beta1_APIVersion(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Versions = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.ThirdPartyResourceData, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResourceData, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.ThirdPartyResource, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResource, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/deep_copy_generated.go
new file mode 100644
index 0000000..b7e43ed
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/deep_copy_generated.go
@@ -0,0 +1,1170 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ intstr "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1beta1_APIVersion,
+ DeepCopy_v1beta1_CPUTargetUtilization,
+ DeepCopy_v1beta1_CustomMetricCurrentStatus,
+ DeepCopy_v1beta1_CustomMetricCurrentStatusList,
+ DeepCopy_v1beta1_CustomMetricTarget,
+ DeepCopy_v1beta1_CustomMetricTargetList,
+ DeepCopy_v1beta1_DaemonSet,
+ DeepCopy_v1beta1_DaemonSetList,
+ DeepCopy_v1beta1_DaemonSetSpec,
+ DeepCopy_v1beta1_DaemonSetStatus,
+ DeepCopy_v1beta1_Deployment,
+ DeepCopy_v1beta1_DeploymentList,
+ DeepCopy_v1beta1_DeploymentRollback,
+ DeepCopy_v1beta1_DeploymentSpec,
+ DeepCopy_v1beta1_DeploymentStatus,
+ DeepCopy_v1beta1_DeploymentStrategy,
+ DeepCopy_v1beta1_ExportOptions,
+ DeepCopy_v1beta1_FSGroupStrategyOptions,
+ DeepCopy_v1beta1_HTTPIngressPath,
+ DeepCopy_v1beta1_HTTPIngressRuleValue,
+ DeepCopy_v1beta1_HorizontalPodAutoscaler,
+ DeepCopy_v1beta1_HorizontalPodAutoscalerList,
+ DeepCopy_v1beta1_HorizontalPodAutoscalerSpec,
+ DeepCopy_v1beta1_HorizontalPodAutoscalerStatus,
+ DeepCopy_v1beta1_HostPortRange,
+ DeepCopy_v1beta1_IDRange,
+ DeepCopy_v1beta1_Ingress,
+ DeepCopy_v1beta1_IngressBackend,
+ DeepCopy_v1beta1_IngressList,
+ DeepCopy_v1beta1_IngressRule,
+ DeepCopy_v1beta1_IngressRuleValue,
+ DeepCopy_v1beta1_IngressSpec,
+ DeepCopy_v1beta1_IngressStatus,
+ DeepCopy_v1beta1_IngressTLS,
+ DeepCopy_v1beta1_Job,
+ DeepCopy_v1beta1_JobCondition,
+ DeepCopy_v1beta1_JobList,
+ DeepCopy_v1beta1_JobSpec,
+ DeepCopy_v1beta1_JobStatus,
+ DeepCopy_v1beta1_LabelSelector,
+ DeepCopy_v1beta1_LabelSelectorRequirement,
+ DeepCopy_v1beta1_ListOptions,
+ DeepCopy_v1beta1_NetworkPolicy,
+ DeepCopy_v1beta1_NetworkPolicyIngressRule,
+ DeepCopy_v1beta1_NetworkPolicyList,
+ DeepCopy_v1beta1_NetworkPolicyPeer,
+ DeepCopy_v1beta1_NetworkPolicyPort,
+ DeepCopy_v1beta1_NetworkPolicySpec,
+ DeepCopy_v1beta1_PodSecurityPolicy,
+ DeepCopy_v1beta1_PodSecurityPolicyList,
+ DeepCopy_v1beta1_PodSecurityPolicySpec,
+ DeepCopy_v1beta1_ReplicaSet,
+ DeepCopy_v1beta1_ReplicaSetList,
+ DeepCopy_v1beta1_ReplicaSetSpec,
+ DeepCopy_v1beta1_ReplicaSetStatus,
+ DeepCopy_v1beta1_ReplicationControllerDummy,
+ DeepCopy_v1beta1_RollbackConfig,
+ DeepCopy_v1beta1_RollingUpdateDeployment,
+ DeepCopy_v1beta1_RunAsUserStrategyOptions,
+ DeepCopy_v1beta1_SELinuxStrategyOptions,
+ DeepCopy_v1beta1_Scale,
+ DeepCopy_v1beta1_ScaleSpec,
+ DeepCopy_v1beta1_ScaleStatus,
+ DeepCopy_v1beta1_SubresourceReference,
+ DeepCopy_v1beta1_SupplementalGroupsStrategyOptions,
+ DeepCopy_v1beta1_ThirdPartyResource,
+ DeepCopy_v1beta1_ThirdPartyResourceData,
+ DeepCopy_v1beta1_ThirdPartyResourceDataList,
+ DeepCopy_v1beta1_ThirdPartyResourceList,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1beta1_APIVersion(in APIVersion, out *APIVersion, c *conversion.Cloner) error {
+ out.Name = in.Name
+ return nil
+}
+
+func DeepCopy_v1beta1_CPUTargetUtilization(in CPUTargetUtilization, out *CPUTargetUtilization, c *conversion.Cloner) error {
+ out.TargetPercentage = in.TargetPercentage
+ return nil
+}
+
+func DeepCopy_v1beta1_CustomMetricCurrentStatus(in CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+}
+
+func DeepCopy_v1beta1_CustomMetricCurrentStatusList(in CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_CustomMetricTarget(in CustomMetricTarget, out *CustomMetricTarget, c *conversion.Cloner) error {
+ out.Name = in.Name
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+}
+
+func DeepCopy_v1beta1_CustomMetricTargetList(in CustomMetricTargetList, out *CustomMetricTargetList, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_DaemonSet(in DaemonSet, out *DaemonSet, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DaemonSetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1beta1_DaemonSetList(in DaemonSetList, out *DaemonSetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1beta1_DaemonSet(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_DaemonSetSpec(in DaemonSetSpec, out *DaemonSetSpec, c *conversion.Cloner) error {
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_DaemonSetStatus(in DaemonSetStatus, out *DaemonSetStatus, c *conversion.Cloner) error {
+ out.CurrentNumberScheduled = in.CurrentNumberScheduled
+ out.NumberMisscheduled = in.NumberMisscheduled
+ out.DesiredNumberScheduled = in.DesiredNumberScheduled
+ return nil
+}
+
+func DeepCopy_v1beta1_Deployment(in Deployment, out *Deployment, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1beta1_DeploymentList(in DeploymentList, out *DeploymentList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1beta1_Deployment(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_DeploymentRollback(in DeploymentRollback, out *DeploymentRollback, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Name = in.Name
+ if in.UpdatedAnnotations != nil {
+ in, out := in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.UpdatedAnnotations = nil
+ }
+ out.RollbackTo = in.RollbackTo
+ return nil
+}
+
+func DeepCopy_v1beta1_DeploymentSpec(in DeploymentSpec, out *DeploymentSpec, c *conversion.Cloner) error {
+ if in.Replicas != nil {
+ in, out := in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Replicas = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := 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
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ if in.RevisionHistoryLimit != nil {
+ in, out := in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.RevisionHistoryLimit = nil
+ }
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ in, out := in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = *in
+ } else {
+ out.RollbackTo = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_DeploymentStatus(in DeploymentStatus, out *DeploymentStatus, c *conversion.Cloner) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = in.Replicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ return nil
+}
+
+func DeepCopy_v1beta1_DeploymentStrategy(in DeploymentStrategy, out *DeploymentStrategy, c *conversion.Cloner) error {
+ out.Type = in.Type
+ 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
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.Export = in.Export
+ out.Exact = in.Exact
+ return nil
+}
+
+func DeepCopy_v1beta1_FSGroupStrategyOptions(in FSGroupStrategyOptions, out *FSGroupStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.Ranges != nil {
+ in, out := in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_HTTPIngressPath(in HTTPIngressPath, out *HTTPIngressPath, c *conversion.Cloner) error {
+ out.Path = in.Path
+ out.Backend = in.Backend
+ return nil
+}
+
+func DeepCopy_v1beta1_HTTPIngressRuleValue(in HTTPIngressRuleValue, out *HTTPIngressRuleValue, c *conversion.Cloner) error {
+ if in.Paths != nil {
+ in, out := in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Paths = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_HorizontalPodAutoscaler(in HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_HorizontalPodAutoscalerList(in HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1beta1_HorizontalPodAutoscaler(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(in HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, c *conversion.Cloner) error {
+ out.ScaleRef = in.ScaleRef
+ if in.MinReplicas != nil {
+ in, out := in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.MinReplicas = nil
+ }
+ out.MaxReplicas = in.MaxReplicas
+ if in.CPUUtilization != nil {
+ in, out := in.CPUUtilization, &out.CPUUtilization
+ *out = new(CPUTargetUtilization)
+ **out = *in
+ } else {
+ out.CPUUtilization = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(in HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, c *conversion.Cloner) error {
+ if in.ObservedGeneration != nil {
+ in, out := in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ObservedGeneration = nil
+ }
+ if in.LastScaleTime != nil {
+ in, out := in.LastScaleTime, &out.LastScaleTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.LastScaleTime = nil
+ }
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ if in.CurrentCPUUtilizationPercentage != nil {
+ in, out := in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.CurrentCPUUtilizationPercentage = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_HostPortRange(in HostPortRange, out *HostPortRange, c *conversion.Cloner) error {
+ out.Min = in.Min
+ out.Max = in.Max
+ return nil
+}
+
+func DeepCopy_v1beta1_IDRange(in IDRange, out *IDRange, c *conversion.Cloner) error {
+ out.Min = in.Min
+ out.Max = in.Max
+ return nil
+}
+
+func DeepCopy_v1beta1_Ingress(in Ingress, out *Ingress, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+}
+
+func DeepCopy_v1beta1_IngressBackend(in IngressBackend, out *IngressBackend, c *conversion.Cloner) error {
+ out.ServiceName = in.ServiceName
+ out.ServicePort = in.ServicePort
+ return nil
+}
+
+func DeepCopy_v1beta1_IngressList(in IngressList, out *IngressList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_IngressRule(in IngressRule, out *IngressRule, c *conversion.Cloner) error {
+ out.Host = in.Host
+ if err := DeepCopy_v1beta1_IngressRuleValue(in.IngressRuleValue, &out.IngressRuleValue, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_IngressRuleValue(in IngressRuleValue, out *IngressRuleValue, c *conversion.Cloner) error {
+ 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
+ }
+ } else {
+ out.HTTP = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_IngressSpec(in IngressSpec, out *IngressSpec, c *conversion.Cloner) error {
+ if in.Backend != nil {
+ in, out := in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ **out = *in
+ } else {
+ out.Backend = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.TLS = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_IngressStatus(in IngressStatus, out *IngressStatus, c *conversion.Cloner) error {
+ if err := v1.DeepCopy_v1_LoadBalancerStatus(in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_IngressTLS(in IngressTLS, out *IngressTLS, c *conversion.Cloner) error {
+ if in.Hosts != nil {
+ in, out := in.Hosts, &out.Hosts
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Hosts = nil
+ }
+ out.SecretName = in.SecretName
+ return nil
+}
+
+func DeepCopy_v1beta1_Job(in Job, out *Job, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_JobSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_JobStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_JobCondition(in JobCondition, out *JobCondition, c *conversion.Cloner) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+func DeepCopy_v1beta1_JobList(in JobList, out *JobList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1beta1_Job(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_JobSpec(in JobSpec, out *JobSpec, c *conversion.Cloner) error {
+ if in.Parallelism != nil {
+ in, out := in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Parallelism = nil
+ }
+ if in.Completions != nil {
+ in, out := in.Completions, &out.Completions
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Completions = nil
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.ActiveDeadlineSeconds = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if in.AutoSelector != nil {
+ in, out := in.AutoSelector, &out.AutoSelector
+ *out = new(bool)
+ **out = *in
+ } else {
+ out.AutoSelector = nil
+ }
+ if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_JobStatus(in JobStatus, out *JobStatus, c *conversion.Cloner) error {
+ if in.Conditions != nil {
+ in, out := in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(in))
+ for i := range in {
+ if err := DeepCopy_v1beta1_JobCondition(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Conditions = nil
+ }
+ if in.StartTime != nil {
+ in, out := in.StartTime, &out.StartTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.StartTime = nil
+ }
+ if in.CompletionTime != nil {
+ in, out := in.CompletionTime, &out.CompletionTime
+ *out = new(unversioned.Time)
+ **out = in.DeepCopy()
+ } else {
+ out.CompletionTime = nil
+ }
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+func DeepCopy_v1beta1_LabelSelector(in LabelSelector, out *LabelSelector, c *conversion.Cloner) error {
+ if in.MatchLabels != nil {
+ in, out := in.MatchLabels, &out.MatchLabels
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.MatchLabels = nil
+ }
+ if in.MatchExpressions != nil {
+ in, out := in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(in))
+ for i := range in {
+ if err := DeepCopy_v1beta1_LabelSelectorRequirement(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.MatchExpressions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_LabelSelectorRequirement(in LabelSelectorRequirement, out *LabelSelectorRequirement, c *conversion.Cloner) error {
+ out.Key = in.Key
+ out.Operator = in.Operator
+ if in.Values != nil {
+ in, out := in.Values, &out.Values
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Values = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ListOptions(in ListOptions, out *ListOptions, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.LabelSelector = in.LabelSelector
+ out.FieldSelector = in.FieldSelector
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ if in.TimeoutSeconds != nil {
+ in, out := in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = *in
+ } else {
+ out.TimeoutSeconds = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_NetworkPolicy(in NetworkPolicy, out *NetworkPolicy, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_NetworkPolicySpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_NetworkPolicyIngressRule(in NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, c *conversion.Cloner) error {
+ 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
+ }
+ }
+ } else {
+ out.Ports = nil
+ }
+ 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
+ }
+ }
+ } else {
+ out.From = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_NetworkPolicyList(in NetworkPolicyList, out *NetworkPolicyList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_NetworkPolicyPeer(in NetworkPolicyPeer, out *NetworkPolicyPeer, c *conversion.Cloner) error {
+ if in.PodSelector != nil {
+ in, out := in.PodSelector, &out.PodSelector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ in, out := in.NamespaceSelector, &out.NamespaceSelector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_NetworkPolicyPort(in NetworkPolicyPort, out *NetworkPolicyPort, c *conversion.Cloner) error {
+ if in.Protocol != nil {
+ in, out := in.Protocol, &out.Protocol
+ *out = new(v1.Protocol)
+ **out = *in
+ } else {
+ out.Protocol = nil
+ }
+ if in.Port != nil {
+ in, out := in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = *in
+ } else {
+ out.Port = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_NetworkPolicySpec(in NetworkPolicySpec, out *NetworkPolicySpec, c *conversion.Cloner) error {
+ if err := DeepCopy_v1beta1_LabelSelector(in.PodSelector, &out.PodSelector, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Ingress = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_PodSecurityPolicySpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_PodSecurityPolicyList(in PodSecurityPolicyList, out *PodSecurityPolicyList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1beta1_PodSecurityPolicy(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error {
+ out.Privileged = in.Privileged
+ if in.DefaultAddCapabilities != nil {
+ in, out := in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]v1.Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.DefaultAddCapabilities = nil
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]v1.Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.RequiredDropCapabilities = nil
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]v1.Capability, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.AllowedCapabilities = nil
+ }
+ if in.Volumes != nil {
+ in, out := in.Volumes, &out.Volumes
+ *out = make([]FSType, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.HostNetwork = in.HostNetwork
+ if in.HostPorts != nil {
+ in, out := in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.HostPorts = nil
+ }
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ 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
+ }
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+func DeepCopy_v1beta1_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_ReplicaSetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1beta1_ReplicaSetList(in ReplicaSetList, out *ReplicaSetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1beta1_ReplicaSet(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ReplicaSetSpec(in ReplicaSetSpec, out *ReplicaSetSpec, c *conversion.Cloner) error {
+ if in.Replicas != nil {
+ in, out := in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = *in
+ } else {
+ out.Replicas = nil
+ }
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(LabelSelector)
+ if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ReplicaSetStatus(in ReplicaSetStatus, out *ReplicaSetStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func DeepCopy_v1beta1_ReplicationControllerDummy(in ReplicationControllerDummy, out *ReplicationControllerDummy, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ return nil
+}
+
+func DeepCopy_v1beta1_RollbackConfig(in RollbackConfig, out *RollbackConfig, c *conversion.Cloner) error {
+ out.Revision = in.Revision
+ return nil
+}
+
+func DeepCopy_v1beta1_RollingUpdateDeployment(in RollingUpdateDeployment, out *RollingUpdateDeployment, c *conversion.Cloner) error {
+ if in.MaxUnavailable != nil {
+ in, out := in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = *in
+ } else {
+ out.MaxUnavailable = nil
+ }
+ if in.MaxSurge != nil {
+ in, out := in.MaxSurge, &out.MaxSurge
+ *out = new(intstr.IntOrString)
+ **out = *in
+ } else {
+ out.MaxSurge = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_RunAsUserStrategyOptions(in RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.Ranges != nil {
+ in, out := in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_SELinuxStrategyOptions(in SELinuxStrategyOptions, out *SELinuxStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.SELinuxOptions != nil {
+ in, out := in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(v1.SELinuxOptions)
+ **out = *in
+ } else {
+ out.SELinuxOptions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_Scale(in Scale, out *Scale, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Spec = in.Spec
+ if err := DeepCopy_v1beta1_ScaleStatus(in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ScaleSpec(in ScaleSpec, out *ScaleSpec, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+func DeepCopy_v1beta1_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conversion.Cloner) error {
+ out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range in {
+ (*out)[key] = val
+ }
+ } else {
+ out.Selector = nil
+ }
+ out.TargetSelector = in.TargetSelector
+ return nil
+}
+
+func DeepCopy_v1beta1_SubresourceReference(in SubresourceReference, out *SubresourceReference, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ out.Subresource = in.Subresource
+ return nil
+}
+
+func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, c *conversion.Cloner) error {
+ out.Rule = in.Rule
+ if in.Ranges != nil {
+ in, out := in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Ranges = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ out.Description = in.Description
+ if in.Versions != nil {
+ in, out := in.Versions, &out.Versions
+ *out = make([]APIVersion, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Versions = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ThirdPartyResourceData(in ThirdPartyResourceData, out *ThirdPartyResourceData, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Data != nil {
+ in, out := in.Data, &out.Data
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Data = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ThirdPartyResourceDataList(in ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1beta1_ThirdPartyResourceList(in ThirdPartyResourceList, out *ThirdPartyResourceList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go
new file mode 100644
index 0000000..ab6a202
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.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 v1beta1
+
+import (
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) {
+ scheme.AddDefaultingFuncs(
+ SetDefaults_DaemonSet,
+ SetDefaults_Deployment,
+ SetDefaults_Job,
+ SetDefaults_HorizontalPodAutoscaler,
+ SetDefaults_ReplicaSet,
+ SetDefaults_NetworkPolicy,
+ )
+}
+
+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 = &LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+}
+
+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 = &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 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_Job(obj *Job) {
+ labels := obj.Spec.Template.Labels
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ // if an autoselector is requested, we'll build the selector later with controller-uid and job-name
+ autoSelector := bool(obj.Spec.AutoSelector != nil && *obj.Spec.AutoSelector)
+
+ // otherwise, we are using a manual selector
+ manualSelector := !autoSelector
+
+ // and default behavior for an unspecified manual selector is to use the pod template labels
+ if manualSelector && obj.Spec.Selector == nil {
+ obj.Spec.Selector = &LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ // 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
+ }
+}
+
+func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
+ if obj.Spec.MinReplicas == nil {
+ minReplicas := int32(1)
+ obj.Spec.MinReplicas = &minReplicas
+ }
+ if obj.Spec.CPUUtilization == nil {
+ obj.Spec.CPUUtilization = &CPUTargetUtilization{TargetPercentage: 80}
+ }
+}
+
+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 = &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 {
+ // TODO: Update Ports to be a pointer to slice as soon as auto-generation supports it.
+ for _, p := range i.Ports {
+ if p.Protocol == nil {
+ proto := v1.ProtocolTCP
+ p.Protocol = &proto
+ }
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go
new file mode 100644
index 0000000..dc87900
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/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/extensions
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
+
+package v1beta1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go
new file mode 100644
index 0000000..b585533
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go
@@ -0,0 +1,13005 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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
+ CPUTargetUtilization
+ CustomMetricCurrentStatus
+ CustomMetricCurrentStatusList
+ CustomMetricTarget
+ CustomMetricTargetList
+ DaemonSet
+ DaemonSetList
+ DaemonSetSpec
+ DaemonSetStatus
+ Deployment
+ DeploymentList
+ DeploymentRollback
+ DeploymentSpec
+ DeploymentStatus
+ DeploymentStrategy
+ ExportOptions
+ FSGroupStrategyOptions
+ HTTPIngressPath
+ HTTPIngressRuleValue
+ HorizontalPodAutoscaler
+ HorizontalPodAutoscalerList
+ HorizontalPodAutoscalerSpec
+ HorizontalPodAutoscalerStatus
+ HostPortRange
+ IDRange
+ Ingress
+ IngressBackend
+ IngressList
+ IngressRule
+ IngressRuleValue
+ IngressSpec
+ IngressStatus
+ IngressTLS
+ Job
+ JobCondition
+ JobList
+ JobSpec
+ JobStatus
+ LabelSelector
+ LabelSelectorRequirement
+ ListOptions
+ NetworkPolicy
+ NetworkPolicyIngressRule
+ NetworkPolicyList
+ NetworkPolicyPeer
+ NetworkPolicyPort
+ NetworkPolicySpec
+ PodSecurityPolicy
+ PodSecurityPolicyList
+ PodSecurityPolicySpec
+ ReplicaSet
+ ReplicaSetList
+ ReplicaSetSpec
+ ReplicaSetStatus
+ ReplicationControllerDummy
+ RollbackConfig
+ RollingUpdateDeployment
+ RunAsUserStrategyOptions
+ SELinuxStrategyOptions
+ Scale
+ ScaleSpec
+ ScaleStatus
+ SubresourceReference
+ SupplementalGroupsStrategyOptions
+ ThirdPartyResource
+ ThirdPartyResourceData
+ ThirdPartyResourceDataList
+ ThirdPartyResourceList
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import k8s_io_kubernetes_pkg_util_intstr "k8s.io/kubernetes/pkg/util/intstr"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *APIVersion) Reset() { *m = APIVersion{} }
+func (m *APIVersion) String() string { return proto.CompactTextString(m) }
+func (*APIVersion) ProtoMessage() {}
+
+func (m *CPUTargetUtilization) Reset() { *m = CPUTargetUtilization{} }
+func (m *CPUTargetUtilization) String() string { return proto.CompactTextString(m) }
+func (*CPUTargetUtilization) ProtoMessage() {}
+
+func (m *CustomMetricCurrentStatus) Reset() { *m = CustomMetricCurrentStatus{} }
+func (m *CustomMetricCurrentStatus) String() string { return proto.CompactTextString(m) }
+func (*CustomMetricCurrentStatus) ProtoMessage() {}
+
+func (m *CustomMetricCurrentStatusList) Reset() { *m = CustomMetricCurrentStatusList{} }
+func (m *CustomMetricCurrentStatusList) String() string { return proto.CompactTextString(m) }
+func (*CustomMetricCurrentStatusList) ProtoMessage() {}
+
+func (m *CustomMetricTarget) Reset() { *m = CustomMetricTarget{} }
+func (m *CustomMetricTarget) String() string { return proto.CompactTextString(m) }
+func (*CustomMetricTarget) ProtoMessage() {}
+
+func (m *CustomMetricTargetList) Reset() { *m = CustomMetricTargetList{} }
+func (m *CustomMetricTargetList) String() string { return proto.CompactTextString(m) }
+func (*CustomMetricTargetList) ProtoMessage() {}
+
+func (m *DaemonSet) Reset() { *m = DaemonSet{} }
+func (m *DaemonSet) String() string { return proto.CompactTextString(m) }
+func (*DaemonSet) ProtoMessage() {}
+
+func (m *DaemonSetList) Reset() { *m = DaemonSetList{} }
+func (m *DaemonSetList) String() string { return proto.CompactTextString(m) }
+func (*DaemonSetList) ProtoMessage() {}
+
+func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} }
+func (m *DaemonSetSpec) String() string { return proto.CompactTextString(m) }
+func (*DaemonSetSpec) ProtoMessage() {}
+
+func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} }
+func (m *DaemonSetStatus) String() string { return proto.CompactTextString(m) }
+func (*DaemonSetStatus) ProtoMessage() {}
+
+func (m *Deployment) Reset() { *m = Deployment{} }
+func (m *Deployment) String() string { return proto.CompactTextString(m) }
+func (*Deployment) ProtoMessage() {}
+
+func (m *DeploymentList) Reset() { *m = DeploymentList{} }
+func (m *DeploymentList) String() string { return proto.CompactTextString(m) }
+func (*DeploymentList) ProtoMessage() {}
+
+func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
+func (m *DeploymentRollback) String() string { return proto.CompactTextString(m) }
+func (*DeploymentRollback) ProtoMessage() {}
+
+func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
+func (m *DeploymentSpec) String() string { return proto.CompactTextString(m) }
+func (*DeploymentSpec) ProtoMessage() {}
+
+func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
+func (m *DeploymentStatus) String() string { return proto.CompactTextString(m) }
+func (*DeploymentStatus) ProtoMessage() {}
+
+func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
+func (m *DeploymentStrategy) String() string { return proto.CompactTextString(m) }
+func (*DeploymentStrategy) ProtoMessage() {}
+
+func (m *ExportOptions) Reset() { *m = ExportOptions{} }
+func (m *ExportOptions) String() string { return proto.CompactTextString(m) }
+func (*ExportOptions) ProtoMessage() {}
+
+func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} }
+func (m *FSGroupStrategyOptions) String() string { return proto.CompactTextString(m) }
+func (*FSGroupStrategyOptions) ProtoMessage() {}
+
+func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} }
+func (m *HTTPIngressPath) String() string { return proto.CompactTextString(m) }
+func (*HTTPIngressPath) ProtoMessage() {}
+
+func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} }
+func (m *HTTPIngressRuleValue) String() string { return proto.CompactTextString(m) }
+func (*HTTPIngressRuleValue) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
+func (m *HorizontalPodAutoscaler) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscaler) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
+func (m *HorizontalPodAutoscalerList) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscalerList) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
+func (m *HorizontalPodAutoscalerSpec) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
+
+func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
+func (m *HorizontalPodAutoscalerStatus) String() string { return proto.CompactTextString(m) }
+func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
+
+func (m *HostPortRange) Reset() { *m = HostPortRange{} }
+func (m *HostPortRange) String() string { return proto.CompactTextString(m) }
+func (*HostPortRange) ProtoMessage() {}
+
+func (m *IDRange) Reset() { *m = IDRange{} }
+func (m *IDRange) String() string { return proto.CompactTextString(m) }
+func (*IDRange) ProtoMessage() {}
+
+func (m *Ingress) Reset() { *m = Ingress{} }
+func (m *Ingress) String() string { return proto.CompactTextString(m) }
+func (*Ingress) ProtoMessage() {}
+
+func (m *IngressBackend) Reset() { *m = IngressBackend{} }
+func (m *IngressBackend) String() string { return proto.CompactTextString(m) }
+func (*IngressBackend) ProtoMessage() {}
+
+func (m *IngressList) Reset() { *m = IngressList{} }
+func (m *IngressList) String() string { return proto.CompactTextString(m) }
+func (*IngressList) ProtoMessage() {}
+
+func (m *IngressRule) Reset() { *m = IngressRule{} }
+func (m *IngressRule) String() string { return proto.CompactTextString(m) }
+func (*IngressRule) ProtoMessage() {}
+
+func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} }
+func (m *IngressRuleValue) String() string { return proto.CompactTextString(m) }
+func (*IngressRuleValue) ProtoMessage() {}
+
+func (m *IngressSpec) Reset() { *m = IngressSpec{} }
+func (m *IngressSpec) String() string { return proto.CompactTextString(m) }
+func (*IngressSpec) ProtoMessage() {}
+
+func (m *IngressStatus) Reset() { *m = IngressStatus{} }
+func (m *IngressStatus) String() string { return proto.CompactTextString(m) }
+func (*IngressStatus) ProtoMessage() {}
+
+func (m *IngressTLS) Reset() { *m = IngressTLS{} }
+func (m *IngressTLS) String() string { return proto.CompactTextString(m) }
+func (*IngressTLS) ProtoMessage() {}
+
+func (m *Job) Reset() { *m = Job{} }
+func (m *Job) String() string { return proto.CompactTextString(m) }
+func (*Job) ProtoMessage() {}
+
+func (m *JobCondition) Reset() { *m = JobCondition{} }
+func (m *JobCondition) String() string { return proto.CompactTextString(m) }
+func (*JobCondition) ProtoMessage() {}
+
+func (m *JobList) Reset() { *m = JobList{} }
+func (m *JobList) String() string { return proto.CompactTextString(m) }
+func (*JobList) ProtoMessage() {}
+
+func (m *JobSpec) Reset() { *m = JobSpec{} }
+func (m *JobSpec) String() string { return proto.CompactTextString(m) }
+func (*JobSpec) ProtoMessage() {}
+
+func (m *JobStatus) Reset() { *m = JobStatus{} }
+func (m *JobStatus) String() string { return proto.CompactTextString(m) }
+func (*JobStatus) ProtoMessage() {}
+
+func (m *LabelSelector) Reset() { *m = LabelSelector{} }
+func (m *LabelSelector) String() string { return proto.CompactTextString(m) }
+func (*LabelSelector) ProtoMessage() {}
+
+func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
+func (m *LabelSelectorRequirement) String() string { return proto.CompactTextString(m) }
+func (*LabelSelectorRequirement) ProtoMessage() {}
+
+func (m *ListOptions) Reset() { *m = ListOptions{} }
+func (m *ListOptions) String() string { return proto.CompactTextString(m) }
+func (*ListOptions) ProtoMessage() {}
+
+func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
+func (m *NetworkPolicy) String() string { return proto.CompactTextString(m) }
+func (*NetworkPolicy) ProtoMessage() {}
+
+func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
+func (m *NetworkPolicyIngressRule) String() string { return proto.CompactTextString(m) }
+func (*NetworkPolicyIngressRule) ProtoMessage() {}
+
+func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
+func (m *NetworkPolicyList) String() string { return proto.CompactTextString(m) }
+func (*NetworkPolicyList) ProtoMessage() {}
+
+func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
+func (m *NetworkPolicyPeer) String() string { return proto.CompactTextString(m) }
+func (*NetworkPolicyPeer) ProtoMessage() {}
+
+func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
+func (m *NetworkPolicyPort) String() string { return proto.CompactTextString(m) }
+func (*NetworkPolicyPort) ProtoMessage() {}
+
+func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
+func (m *NetworkPolicySpec) String() string { return proto.CompactTextString(m) }
+func (*NetworkPolicySpec) ProtoMessage() {}
+
+func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} }
+func (m *PodSecurityPolicy) String() string { return proto.CompactTextString(m) }
+func (*PodSecurityPolicy) ProtoMessage() {}
+
+func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} }
+func (m *PodSecurityPolicyList) String() string { return proto.CompactTextString(m) }
+func (*PodSecurityPolicyList) ProtoMessage() {}
+
+func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} }
+func (m *PodSecurityPolicySpec) String() string { return proto.CompactTextString(m) }
+func (*PodSecurityPolicySpec) ProtoMessage() {}
+
+func (m *ReplicaSet) Reset() { *m = ReplicaSet{} }
+func (m *ReplicaSet) String() string { return proto.CompactTextString(m) }
+func (*ReplicaSet) ProtoMessage() {}
+
+func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} }
+func (m *ReplicaSetList) String() string { return proto.CompactTextString(m) }
+func (*ReplicaSetList) ProtoMessage() {}
+
+func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} }
+func (m *ReplicaSetSpec) String() string { return proto.CompactTextString(m) }
+func (*ReplicaSetSpec) ProtoMessage() {}
+
+func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} }
+func (m *ReplicaSetStatus) String() string { return proto.CompactTextString(m) }
+func (*ReplicaSetStatus) ProtoMessage() {}
+
+func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} }
+func (m *ReplicationControllerDummy) String() string { return proto.CompactTextString(m) }
+func (*ReplicationControllerDummy) ProtoMessage() {}
+
+func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
+func (m *RollbackConfig) String() string { return proto.CompactTextString(m) }
+func (*RollbackConfig) ProtoMessage() {}
+
+func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
+func (m *RollingUpdateDeployment) String() string { return proto.CompactTextString(m) }
+func (*RollingUpdateDeployment) ProtoMessage() {}
+
+func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} }
+func (m *RunAsUserStrategyOptions) String() string { return proto.CompactTextString(m) }
+func (*RunAsUserStrategyOptions) ProtoMessage() {}
+
+func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} }
+func (m *SELinuxStrategyOptions) String() string { return proto.CompactTextString(m) }
+func (*SELinuxStrategyOptions) ProtoMessage() {}
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (m *Scale) String() string { return proto.CompactTextString(m) }
+func (*Scale) ProtoMessage() {}
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (m *ScaleSpec) String() string { return proto.CompactTextString(m) }
+func (*ScaleSpec) ProtoMessage() {}
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (m *ScaleStatus) String() string { return proto.CompactTextString(m) }
+func (*ScaleStatus) ProtoMessage() {}
+
+func (m *SubresourceReference) Reset() { *m = SubresourceReference{} }
+func (m *SubresourceReference) String() string { return proto.CompactTextString(m) }
+func (*SubresourceReference) ProtoMessage() {}
+
+func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} }
+func (m *SupplementalGroupsStrategyOptions) String() string { return proto.CompactTextString(m) }
+func (*SupplementalGroupsStrategyOptions) ProtoMessage() {}
+
+func (m *ThirdPartyResource) Reset() { *m = ThirdPartyResource{} }
+func (m *ThirdPartyResource) String() string { return proto.CompactTextString(m) }
+func (*ThirdPartyResource) ProtoMessage() {}
+
+func (m *ThirdPartyResourceData) Reset() { *m = ThirdPartyResourceData{} }
+func (m *ThirdPartyResourceData) String() string { return proto.CompactTextString(m) }
+func (*ThirdPartyResourceData) ProtoMessage() {}
+
+func (m *ThirdPartyResourceDataList) Reset() { *m = ThirdPartyResourceDataList{} }
+func (m *ThirdPartyResourceDataList) String() string { return proto.CompactTextString(m) }
+func (*ThirdPartyResourceDataList) ProtoMessage() {}
+
+func (m *ThirdPartyResourceList) Reset() { *m = ThirdPartyResourceList{} }
+func (m *ThirdPartyResourceList) String() string { return proto.CompactTextString(m) }
+func (*ThirdPartyResourceList) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*APIVersion)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.APIVersion")
+ proto.RegisterType((*CPUTargetUtilization)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.CPUTargetUtilization")
+ 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((*Deployment)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.Deployment")
+ 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((*ExportOptions)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ExportOptions")
+ 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((*HorizontalPodAutoscaler)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HorizontalPodAutoscaler")
+ proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HorizontalPodAutoscalerList")
+ proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HorizontalPodAutoscalerSpec")
+ proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HorizontalPodAutoscalerStatus")
+ 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((*Job)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.Job")
+ proto.RegisterType((*JobCondition)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.JobCondition")
+ proto.RegisterType((*JobList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.JobList")
+ proto.RegisterType((*JobSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.JobSpec")
+ proto.RegisterType((*JobStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.JobStatus")
+ proto.RegisterType((*LabelSelector)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.LabelSelector")
+ proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.LabelSelectorRequirement")
+ proto.RegisterType((*ListOptions)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ListOptions")
+ 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((*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((*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((*SubresourceReference)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.SubresourceReference")
+ 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 *CPUTargetUtilization) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *CPUTargetUtilization) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0x8
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.TargetPercentage))
+ 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
+ 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))
+ 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()))
+ 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 *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()))
+ 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 *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 {
+ for k := range m.UpdatedAnnotations {
+ data[i] = 0x12
+ i++
+ v := m.UpdatedAnnotations[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()))
+ n13, err := m.RollbackTo.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ 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()))
+ n14, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Template.Size()))
+ n15, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Strategy.Size()))
+ n16, err := m.Strategy.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ 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()))
+ n17, err := m.RollbackTo.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ 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))
+ 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()))
+ n18, err := m.RollingUpdate.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ 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 *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()))
+ n19, err := m.Backend.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ 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 *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()))
+ n20, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n21, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n22, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ 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()))
+ n23, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ 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.ScaleRef.Size()))
+ n24, err := m.ScaleRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ 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.CPUUtilization != nil {
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.CPUUtilization.Size()))
+ n25, err := m.CPUUtilization.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ }
+ 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()))
+ n26, err := m.LastScaleTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ }
+ 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 *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()))
+ n27, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n28, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n29, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ 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()))
+ n30, err := m.ServicePort.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ 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()))
+ n31, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ 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()))
+ n32, err := m.IngressRuleValue.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ 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()))
+ n33, err := m.HTTP.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ }
+ 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()))
+ n34, err := m.Backend.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ }
+ 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()))
+ n35, err := m.LoadBalancer.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ 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 *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()))
+ n36, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n37, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n38, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ 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()))
+ n39, err := m.LastProbeTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size()))
+ n40, err := m.LastTransitionTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n40
+ 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()))
+ n41, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n41
+ 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()))
+ n42, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n42
+ }
+ if m.AutoSelector != nil {
+ data[i] = 0x28
+ i++
+ if *m.AutoSelector {
+ data[i] = 1
+ } else {
+ data[i] = 0
+ }
+ i++
+ }
+ data[i] = 0x32
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Template.Size()))
+ n43, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ 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()))
+ n44, err := m.StartTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ }
+ if m.CompletionTime != nil {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.CompletionTime.Size()))
+ n45, err := m.CompletionTime.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ }
+ 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 (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 {
+ for k := range m.MatchLabels {
+ data[i] = 0xa
+ i++
+ v := m.MatchLabels[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 *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))
+ }
+ 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()))
+ n46, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n47, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ 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()))
+ n48, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ 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()))
+ n49, err := m.PodSelector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ }
+ if m.NamespaceSelector != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.NamespaceSelector.Size()))
+ n50, err := m.NamespaceSelector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ }
+ 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()))
+ n51, err := m.Port.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ }
+ 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()))
+ n52, err := m.PodSelector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ 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()))
+ n53, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n54, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ 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()))
+ n55, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ 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()))
+ n56, err := m.SELinux.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ data[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.RunAsUser.Size()))
+ n57, err := m.RunAsUser.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ data[i] = 0x62
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.SupplementalGroups.Size()))
+ n58, err := m.SupplementalGroups.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ data[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.FSGroup.Size()))
+ n59, err := m.FSGroup.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ 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()))
+ n60, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n61, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n62, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ 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()))
+ 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 *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()))
+ n64, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ }
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Template.Size()))
+ n65, err := m.Template.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n65
+ 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))
+ 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 *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()))
+ n66, err := m.MaxUnavailable.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n66
+ }
+ if m.MaxSurge != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.MaxSurge.Size()))
+ n67, err := m.MaxSurge.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n67
+ }
+ 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()))
+ n68, err := m.SELinuxOptions.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n68
+ }
+ 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()))
+ 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 *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 {
+ for k := range m.Selector {
+ data[i] = 0x12
+ i++
+ v := m.Selector[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 *SubresourceReference) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *SubresourceReference) 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)
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.Subresource)))
+ i += copy(data[i:], m.Subresource)
+ 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()))
+ n72, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n72
+ 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()))
+ n73, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n73
+ 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()))
+ n74, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n74
+ 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()))
+ n75, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n75
+ 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 *CPUTargetUtilization) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.TargetPercentage))
+ 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))
+ 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))
+ 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 *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))
+ }
+ 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))
+ 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 *ExportOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ 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 *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 *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.ScaleRef.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.CPUUtilization != nil {
+ l = m.CPUUtilization.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 m.CurrentCPUUtilizationPercentage != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage))
+ }
+ 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 *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.AutoSelector != 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 (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 *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))
+ }
+ 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 *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))
+ 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))
+ 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 *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 *SubresourceReference) 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))
+ l = len(m.Subresource)
+ 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 (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 *CPUTargetUtilization) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CPUTargetUtilization: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CPUTargetUtilization: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetPercentage", wireType)
+ }
+ m.TargetPercentage = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ m.TargetPercentage |= (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 *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 = &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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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
+ 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
+ if m.UpdatedAnnotations == nil {
+ m.UpdatedAnnotations = make(map[string]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 = &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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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 *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 *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 *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 ScaleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ScaleRef.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 CPUUtilization", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CPUUtilization == nil {
+ m.CPUUtilization = &CPUTargetUtilization{}
+ }
+ if err := m.CPUUtilization.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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_kubernetes_pkg_api_unversioned.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 *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 *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 = &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 AutoSelector", 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.AutoSelector = &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_kubernetes_pkg_api_unversioned.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_kubernetes_pkg_api_unversioned.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 (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
+ 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
+ if m.MatchLabels == nil {
+ m.MatchLabels = make(map[string]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 *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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 = &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 = &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_kubernetes_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 *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 = &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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 *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_kubernetes_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_kubernetes_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
+ 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
+ if m.Selector == nil {
+ m.Selector = make(map[string]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 *SubresourceReference) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubresourceReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubresourceReference: 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
+ case 4:
+ 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
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
new file mode 100644
index 0000000..46df0d6
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
@@ -0,0 +1,1010 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/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 string name = 1;
+}
+
+message CPUTargetUtilization {
+ // fraction of the requested CPU that should be utilized/used,
+ // e.g. 70 means that 70% of the requested CPU should be in use.
+ optional int32 targetPercentage = 1;
+}
+
+message CustomMetricCurrentStatus {
+ // Custom Metric name.
+ optional string name = 1;
+
+ // Custom Metric value (average).
+ optional k8s.io.kubernetes.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.kubernetes.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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired behavior of this daemon set.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional DaemonSetSpec spec = 2;
+
+ // Status is 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional DaemonSetStatus status = 3;
+}
+
+// DaemonSetList is a collection of daemon sets.
+message DaemonSetList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is a list of daemon sets.
+ repeated DaemonSet items = 2;
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+message DaemonSetSpec {
+ // Selector is 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional LabelSelector selector = 1;
+
+ // Template is the 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 2;
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+message DaemonSetStatus {
+ // CurrentNumberScheduled is the number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
+ optional int32 currentNumberScheduled = 1;
+
+ // NumberMisscheduled is the number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
+ optional int32 numberMisscheduled = 2;
+
+ // DesiredNumberScheduled is the total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
+ optional int32 desiredNumberScheduled = 3;
+}
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+message Deployment {
+ // Standard object metadata.
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the Deployment.
+ optional DeploymentSpec spec = 2;
+
+ // Most recently observed status of the Deployment.
+ optional DeploymentStatus status = 3;
+}
+
+// DeploymentList is a list of Deployments.
+message DeploymentList {
+ // Standard list metadata.
+ optional k8s.io.kubernetes.pkg.api.unversioned.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
+ 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 int32 replicas = 1;
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ optional 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 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 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 int32 revisionHistoryLimit = 6;
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ optional bool paused = 7;
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ optional RollbackConfig rollbackTo = 8;
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+message DeploymentStatus {
+ // The generation observed by the deployment controller.
+ optional int64 observedGeneration = 1;
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ optional int32 replicas = 2;
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ optional int32 updatedReplicas = 3;
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ optional int32 availableReplicas = 4;
+
+ // Total number of unavailable pods targeted by this deployment.
+ optional int32 unavailableReplicas = 5;
+}
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+message DeploymentStrategy {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ 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 RollingUpdateDeployment rollingUpdate = 2;
+}
+
+// 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;
+}
+
+// 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 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.
+ 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 a 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 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;
+}
+
+// configuration of a horizontal pod autoscaler.
+message HorizontalPodAutoscaler {
+ // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ optional HorizontalPodAutoscalerSpec spec = 2;
+
+ // current information about the autoscaler.
+ optional HorizontalPodAutoscalerStatus status = 3;
+}
+
+// list of horizontal pod autoscaler objects.
+message HorizontalPodAutoscalerList {
+ // Standard list metadata.
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // list of horizontal pod autoscaler objects.
+ repeated HorizontalPodAutoscaler items = 2;
+}
+
+// specification of a horizontal pod autoscaler.
+message HorizontalPodAutoscalerSpec {
+ // reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status,
+ // and will set the desired number of pods by modifying its spec.
+ optional SubresourceReference scaleRef = 1;
+
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ 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 it defaults to the target CPU utilization at 80% of the requested resources.
+ optional CPUTargetUtilization cpuUtilization = 4;
+}
+
+// current status of a horizontal pod autoscaler
+message HorizontalPodAutoscalerStatus {
+ // most recent generation observed by this autoscaler.
+ 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 k8s.io.kubernetes.pkg.api.unversioned.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 int32 currentCPUUtilizationPercentage = 5;
+}
+
+// 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec is the desired state of the Ingress.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional IngressSpec spec = 2;
+
+ // Status is the current state of the Ingress.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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.kubernetes.pkg.util.intstr.IntOrString servicePort = 2;
+}
+
+// IngressList is a collection of Ingress.
+message IngressList {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 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 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 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 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.
+ 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.
+ repeated IngressRule rules = 3;
+}
+
+// IngressStatus describe the current state of the Ingress.
+message IngressStatus {
+ // LoadBalancer contains the current status of the load-balancer.
+ 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.
+ 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 string secretName = 2;
+}
+
+// Job represents the configuration of a single job.
+message Job {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional JobSpec spec = 2;
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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 k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
+
+ // Last time the condition transit from one status to another.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ optional string message = 6;
+}
+
+// JobList is a collection of jobs.
+message JobList {
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of Job.
+ repeated Job items = 2;
+}
+
+// JobSpec describes how the job execution will look like.
+message JobSpec {
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ optional int32 parallelism = 1;
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ 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 int64 activeDeadlineSeconds = 3;
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional LabelSelector selector = 4;
+
+ // AutoSelector controls generation of pod labels and pod selectors.
+ // It was not present in the original extensions/v1beta1 Job definition, but exists
+ // to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite
+ // meaning as, ManualSelector.
+ // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
+ optional bool autoSelector = 5;
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6;
+}
+
+// JobStatus represents the current state of a Job.
+message JobStatus {
+ // Conditions represent the latest available observations of an object's current state.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ repeated JobCondition conditions = 1;
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // 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 k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2;
+
+ // 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.
+ optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3;
+
+ // Active is the number of actively running pods.
+ optional int32 active = 4;
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ optional int32 succeeded = 5;
+
+ // Failed is the number of pods which reached Phase Failed.
+ optional int32 failed = 6;
+}
+
+// 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.
+ map<string, string> matchLabels = 1;
+
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ 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.
+ 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.
+ repeated string values = 3;
+}
+
+// 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 string labelSelector = 1;
+
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ optional string fieldSelector = 2;
+
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ 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.
+ optional string resourceVersion = 4;
+
+ // Timeout for the list/watch call.
+ optional int64 timeoutSeconds = 5;
+}
+
+message NetworkPolicy {
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ 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 not provided, this rule matches all ports (traffic not restricted by port).
+ // If this field is empty, this rule matches no ports (no traffic matches).
+ // 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.
+ // TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
+ 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 not provided, this rule matches all sources (traffic not restricted by source).
+ // If this field is empty, this rule matches no sources (no traffic matches).
+ // 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.
+ // TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
+ repeated NetworkPolicyPeer from = 2;
+}
+
+// Network Policy List is a list of NetworkPolicy objects.
+message NetworkPolicyList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 not provided, this selector selects no pods.
+ // If present but empty, this selector selects all pods in this namespace.
+ optional 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 omitted, this selector selects no namespaces.
+ // If present but empty, this selector selects all namespaces.
+ optional LabelSelector namespaceSelector = 2;
+}
+
+message NetworkPolicyPort {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ 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 k8s.io.kubernetes.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 LabelSelector podSelector = 1;
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it,
+ // 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 affect ingress isolation.
+ // If this field is present and contains at least one rule, this policy allows any traffic
+ // which matches at least one of the ingress rules in this list.
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // spec defines the policy enforced.
+ optional PodSecurityPolicySpec spec = 2;
+}
+
+// Pod Security Policy List is a list of PodSecurityPolicy objects.
+message PodSecurityPolicyList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 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.
+ 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.
+ 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.
+ repeated string allowedCapabilities = 4;
+
+ // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ repeated string volumes = 5;
+
+ // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ optional bool hostNetwork = 6;
+
+ // hostPorts determines which host port ranges are allowed to be exposed.
+ repeated HostPortRange hostPorts = 7;
+
+ // hostPID determines if the policy allows the use of HostPID in the pod spec.
+ optional bool hostPID = 8;
+
+ // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the specification of the desired behavior of the ReplicaSet.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ optional ReplicaSetStatus status = 3;
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+message ReplicaSetList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // List of ReplicaSets.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ optional int32 replicas = 1;
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional LabelSelector selector = 2;
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ optional int32 replicas = 1;
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ optional int32 fullyLabeledReplicas = 2;
+
+ // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
+ optional int64 observedGeneration = 3;
+}
+
+// Dummy definition
+message ReplicationControllerDummy {
+}
+
+message RollbackConfig {
+ // The revision to rollback to. If set to 0, rollbck to the last revision.
+ 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 up.
+ // 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 k8s.io.kubernetes.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 k8s.io.kubernetes.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.
+ 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: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
+ optional k8s.io.kubernetes.pkg.api.v1.SELinuxOptions seLinuxOptions = 2;
+}
+
+// represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
+ optional ScaleStatus status = 3;
+}
+
+// describes the attributes of a scale subresource
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ 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://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ optional string targetSelector = 3;
+}
+
+// SubresourceReference contains enough information to let you inspect or modify the referred subresource.
+message SubresourceReference {
+ // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ optional string kind = 1;
+
+ // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ optional string name = 2;
+
+ // API version of the referent
+ optional string apiVersion = 3;
+
+ // Subresource name of the referent
+ optional string subresource = 4;
+}
+
+// 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 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.
+ 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 k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Description is the description of this object.
+ optional string description = 2;
+
+ // Versions are versions for this third party object
+ 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 k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Data is the raw JSON data for this data.
+ optional bytes data = 2;
+}
+
+// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
+message ThirdPartyResourceDataList {
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is the list of ThirdPartyResources.
+ repeated ThirdPartyResource items = 2;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go
new file mode 100644
index 0000000..91c1c48
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.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 v1beta1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "extensions"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ &Job{},
+ &JobList{},
+ &ReplicationControllerDummy{},
+ &Scale{},
+ &ThirdPartyResource{},
+ &ThirdPartyResourceList{},
+ &DaemonSetList{},
+ &DaemonSet{},
+ &ThirdPartyResourceData{},
+ &ThirdPartyResourceDataList{},
+ &Ingress{},
+ &IngressList{},
+ &ListOptions{},
+ &v1.DeleteOptions{},
+ &ReplicaSet{},
+ &ReplicaSetList{},
+ &PodSecurityPolicy{},
+ &PodSecurityPolicyList{},
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ // Add the watch version that applies
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go
new file mode 100644
index 0000000..a0220de
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go
@@ -0,0 +1,23939 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource"
+ pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_types "k8s.io/kubernetes/pkg/types"
+ pkg5_intstr "k8s.io/kubernetes/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 pkg4_resource.Quantity
+ var v1 pkg1_unversioned.TypeMeta
+ var v2 pkg2_v1.ObjectMeta
+ var v3 pkg3_types.UID
+ var v4 pkg5_intstr.IntOrString
+ 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 {
+ x.Replicas = 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 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.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ 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 *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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv5 := &x.Selector
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv5, false, d)
+ }
+ }
+ case "targetSelector":
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ x.TargetSelector = string(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 {
+ x.Replicas = 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 = nil
+ } else {
+ yyv10 := &x.Selector
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, 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.TargetSelector = ""
+ } else {
+ x.TargetSelector = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ScaleSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ScaleStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 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.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ 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.APIVersion = ""
+ } else {
+ x.APIVersion = string(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 *SubresourceReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.Name != ""
+ yyq2[2] = x.APIVersion != ""
+ yyq2[3] = x.Subresource != ""
+ 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.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subresource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubresourceReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubresourceReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ x.Subresource = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubresourceReference) 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 {
+ x.Kind = string(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 {
+ x.Name = string(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 {
+ x.APIVersion = string(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.Subresource = ""
+ } else {
+ x.Subresource = string(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 *CPUTargetUtilization) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.TargetPercentage))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetPercentage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TargetPercentage))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CPUTargetUtilization) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CPUTargetUtilization) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "targetPercentage":
+ if r.TryDecodeAsNil() {
+ x.TargetPercentage = 0
+ } else {
+ x.TargetPercentage = int32(r.DecodeInt(32))
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CPUTargetUtilization) 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.TargetPercentage = 0
+ } else {
+ x.TargetPercentage = int32(r.DecodeInt(32))
+ }
+ 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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg4_resource.Quantity{}
+ } else {
+ yyv5 := &x.TargetValue
+ 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 *CustomMetricTarget) 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 {
+ x.Name = string(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.TargetValue = pkg4_resource.Quantity{}
+ } else {
+ yyv9 := &x.TargetValue
+ 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 *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 {
+ x.Name = string(r.DecodeString())
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg4_resource.Quantity{}
+ } else {
+ yyv5 := &x.CurrentValue
+ 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 *CustomMetricCurrentStatus) 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 {
+ x.Name = string(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.CurrentValue = pkg4_resource.Quantity{}
+ } else {
+ yyv9 := &x.CurrentValue
+ 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 *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 *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.CPUUtilization != 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.ScaleRef
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ScaleRef
+ 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.CPUUtilization == nil {
+ r.EncodeNil()
+ } else {
+ x.CPUUtilization.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cpuUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CPUUtilization == nil {
+ r.EncodeNil()
+ } else {
+ x.CPUUtilization.CodecEncodeSelf(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 "scaleRef":
+ if r.TryDecodeAsNil() {
+ x.ScaleRef = SubresourceReference{}
+ } else {
+ yyv4 := &x.ScaleRef
+ 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 {
+ x.MaxReplicas = int32(r.DecodeInt(32))
+ }
+ case "cpuUtilization":
+ if r.TryDecodeAsNil() {
+ if x.CPUUtilization != nil {
+ x.CPUUtilization = nil
+ }
+ } else {
+ if x.CPUUtilization == nil {
+ x.CPUUtilization = new(CPUTargetUtilization)
+ }
+ x.CPUUtilization.CodecDecodeSelf(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 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.ScaleRef = SubresourceReference{}
+ } else {
+ yyv10 := &x.ScaleRef
+ 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.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = 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.MaxReplicas = 0
+ } else {
+ x.MaxReplicas = 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.CPUUtilization != nil {
+ x.CPUUtilization = nil
+ }
+ } else {
+ if x.CPUUtilization == nil {
+ x.CPUUtilization = new(CPUTargetUtilization)
+ }
+ x.CPUUtilization.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 *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_unversioned.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 {
+ x.CurrentReplicas = int32(r.DecodeInt(32))
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ x.DesiredReplicas = 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)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ 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 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.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_unversioned.Time)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, 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.CurrentReplicas = 0
+ } else {
+ x.CurrentReplicas = 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.DesiredReplicas = 0
+ } else {
+ x.DesiredReplicas = 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.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = x.Description != ""
+ yyq2[2] = len(x.Versions) != 0
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("description"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("versions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "description":
+ if r.TryDecodeAsNil() {
+ x.Description = ""
+ } else {
+ x.Description = string(r.DecodeString())
+ }
+ case "versions":
+ if r.TryDecodeAsNil() {
+ x.Versions = nil
+ } else {
+ yyv6 := &x.Versions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Description = ""
+ } else {
+ x.Description = string(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.Versions = nil
+ } else {
+ yyv13 := &x.Versions
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceThirdPartyResource((*[]ThirdPartyResource)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Name = string(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 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.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ 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 *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] = true
+ yyq2[1] = len(x.Data) != 0
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv5 := &x.Data
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *yyv5 = r.DecodeBytes(*(*[]byte)(yyv5), false, false)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Data = nil
+ } else {
+ yyv11 := &x.Data
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false)
+ }
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = DeploymentSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = DeploymentSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = DeploymentStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [8]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
+ 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] {
+ 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 {
+ x.Selector.CodecEncodeSelf(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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ 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_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(LabelSelector)
+ }
+ x.Selector.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv7 := &x.Template
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "strategy":
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv8 := &x.Strategy
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ x.MinReadySeconds = 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)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "paused":
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ x.Paused = bool(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)
+ }
+ 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 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.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ 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.Strategy = DeploymentStrategy{}
+ } else {
+ yyv19 := &x.Strategy
+ yyv19.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 {
+ x.MinReadySeconds = 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.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = 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.Paused = false
+ } else {
+ x.Paused = bool(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.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.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 *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[1] = len(x.UpdatedAnnotations) != 0
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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.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.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy10 := &x.RollbackTo
+ yy10.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.RollbackTo
+ 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.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ 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)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "updatedAnnotations":
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv5 := &x.UpdatedAnnotations
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv5, false, d)
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv7 := &x.RollbackTo
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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 {
+ x.Name = string(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.UpdatedAnnotations = nil
+ } else {
+ yyv12 := &x.UpdatedAnnotations
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, 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.RollbackTo = RollbackConfig{}
+ } else {
+ yyv14 := &x.RollbackTo
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.Revision = 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 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.Revision = 0
+ } else {
+ x.Revision = int64(r.DecodeInt(64))
+ }
+ 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 *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 {
+ x.Type = DeploymentStrategyType(r.DecodeString())
+ }
+ 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 {
+ x.Type = DeploymentStrategyType(r.DecodeString())
+ }
+ 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 [5]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.AvailableReplicas != 0
+ yyq2[4] = x.UnavailableReplicas != 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.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.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.UnavailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ }
+ }
+ 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 {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ x.UpdatedReplicas = int32(r.DecodeInt(32))
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ x.AvailableReplicas = int32(r.DecodeInt(32))
+ }
+ case "unavailableReplicas":
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ x.UnavailableReplicas = int32(r.DecodeInt(32))
+ }
+ 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 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.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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.Replicas = 0
+ } else {
+ x.Replicas = 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.UpdatedReplicas = 0
+ } else {
+ x.UpdatedReplicas = 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.AvailableReplicas = 0
+ } else {
+ x.AvailableReplicas = 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.UnavailableReplicas = 0
+ } else {
+ x.UnavailableReplicas = int32(r.DecodeInt(32))
+ }
+ 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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Selector != 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 yyq2[0] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ } 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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ 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_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(LabelSelector)
+ }
+ x.Selector.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv5 := &x.Template
+ yyv5.CodecDecodeSelf(d)
+ }
+ 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 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ 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 *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 [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.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_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 {
+ x.CurrentNumberScheduled = int32(r.DecodeInt(32))
+ }
+ case "numberMisscheduled":
+ if r.TryDecodeAsNil() {
+ x.NumberMisscheduled = 0
+ } else {
+ x.NumberMisscheduled = int32(r.DecodeInt(32))
+ }
+ case "desiredNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.DesiredNumberScheduled = 0
+ } else {
+ x.DesiredNumberScheduled = int32(r.DecodeInt(32))
+ }
+ 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 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.CurrentNumberScheduled = 0
+ } else {
+ x.CurrentNumberScheduled = 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.NumberMisscheduled = 0
+ } else {
+ x.NumberMisscheduled = 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.DesiredNumberScheduled = 0
+ } else {
+ x.DesiredNumberScheduled = int32(r.DecodeInt(32))
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = DaemonSetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DaemonSetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = DaemonSetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = DaemonSetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceDaemonSet(([]DaemonSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceDaemonSet((*[]DaemonSet)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceDaemonSet((*[]DaemonSet)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = JobSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = JobStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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.AutoSelector != 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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ } 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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.AutoSelector == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.AutoSelector
+ 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("autoSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AutoSelector == nil {
+ r.EncodeNil()
+ } else {
+ yy24 := *x.AutoSelector
+ 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(LabelSelector)
+ }
+ x.Selector.CodecDecodeSelf(d)
+ }
+ case "autoSelector":
+ if r.TryDecodeAsNil() {
+ if x.AutoSelector != nil {
+ x.AutoSelector = nil
+ }
+ } else {
+ if x.AutoSelector == nil {
+ x.AutoSelector = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.AutoSelector)) = r.DecodeBool()
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv13 := &x.Template
+ yyv13.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 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.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = 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.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = 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.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = 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.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.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.AutoSelector != nil {
+ x.AutoSelector = nil
+ }
+ } else {
+ if x.AutoSelector == nil {
+ x.AutoSelector = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.AutoSelector)) = 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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.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 *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_unversioned.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_unversioned.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 {
+ x.Active = int32(r.DecodeInt(32))
+ }
+ case "succeeded":
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ x.Succeeded = int32(r.DecodeInt(32))
+ }
+ case "failed":
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ x.Failed = 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 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.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(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.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_unversioned.Time)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, 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() {
+ if x.CompletionTime != nil {
+ x.CompletionTime = nil
+ }
+ } else {
+ if x.CompletionTime == nil {
+ x.CompletionTime = new(pkg1_unversioned.Time)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, 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.Active = 0
+ } else {
+ x.Active = 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.Succeeded = 0
+ } else {
+ x.Succeeded = 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.Failed = 0
+ } else {
+ x.Failed = 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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ x.Status = pkg2_v1.ConditionStatus(r.DecodeString())
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.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_unversioned.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 {
+ x.Reason = string(r.DecodeString())
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ x.Message = string(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 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 {
+ x.Type = JobConditionType(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Status = pkg2_v1.ConditionStatus(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_unversioned.Time{}
+ } else {
+ yyv15 := &x.LastProbeTime
+ 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.LastTransitionTime = pkg1_unversioned.Time{}
+ } else {
+ yyv17 := &x.LastTransitionTime
+ 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)
+ }
+ }
+ yyj12++
+ 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 {
+ x.Reason = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.Message = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = IngressSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = IngressStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = IngressSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = IngressStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceIngress(([]Ingress)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceIngress((*[]Ingress)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceIngress((*[]Ingress)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 {
+ x.SecretName = string(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 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.Hosts = nil
+ } else {
+ yyv8 := &x.Hosts
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, 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.SecretName = ""
+ } else {
+ x.SecretName = string(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 *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 = pkg2_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 = pkg2_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 {
+ x.Host = string(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 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.Host = ""
+ } else {
+ x.Host = string(r.DecodeString())
+ }
+ if x.IngressRuleValue.HTTP == nil {
+ x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue)
+ }
+ 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.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.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 *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 {
+ x.Path = string(r.DecodeString())
+ }
+ case "backend":
+ if r.TryDecodeAsNil() {
+ x.Backend = IngressBackend{}
+ } else {
+ yyv5 := &x.Backend
+ yyv5.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 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 {
+ x.Path = string(r.DecodeString())
+ }
+ 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.Backend = IngressBackend{}
+ } else {
+ yyv8 := &x.Backend
+ 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 *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 {
+ x.ServiceName = string(r.DecodeString())
+ }
+ case "servicePort":
+ if r.TryDecodeAsNil() {
+ x.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv5 := &x.ServicePort
+ 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 *IngressBackend) 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.ServiceName = ""
+ } else {
+ x.ServiceName = string(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.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.ServicePort
+ 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 *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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.EncodeBool(bool(x.Export))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("export"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Export))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Exact))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exact"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Exact))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "export":
+ if r.TryDecodeAsNil() {
+ x.Export = false
+ } else {
+ x.Export = bool(r.DecodeBool())
+ }
+ case "exact":
+ if r.TryDecodeAsNil() {
+ x.Exact = false
+ } else {
+ x.Exact = bool(r.DecodeBool())
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExportOptions) 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.Export = false
+ } else {
+ x.Export = bool(r.DecodeBool())
+ }
+ 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.Exact = false
+ } else {
+ x.Exact = bool(r.DecodeBool())
+ }
+ 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.LabelSelector != ""
+ yyq2[1] = x.FieldSelector != ""
+ yyq2[2] = x.Watch != false
+ yyq2[3] = x.ResourceVersion != ""
+ yyq2[4] = x.TimeoutSeconds != nil
+ yyq2[5] = x.Kind != ""
+ yyq2[6] = x.APIVersion != ""
+ 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.LabelSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labelSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("watch"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TimeoutSeconds
+ 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("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TimeoutSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "labelSelector":
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = ""
+ } else {
+ x.LabelSelector = string(r.DecodeString())
+ }
+ case "fieldSelector":
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ x.FieldSelector = string(r.DecodeString())
+ }
+ case "watch":
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ x.Watch = bool(r.DecodeBool())
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.LabelSelector = ""
+ } else {
+ x.LabelSelector = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ x.FieldSelector = string(r.DecodeString())
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ x.Watch = bool(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.ResourceVersion = ""
+ } else {
+ x.ResourceVersion = string(r.DecodeString())
+ }
+ 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.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj12++
+ 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 {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj12++
+ 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 {
+ x.APIVersion = string(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 *LabelSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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.MatchLabels) != 0
+ yyq2[1] = len(x.MatchExpressions) != 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.MatchLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.MatchLabels, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchLabels"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchLabels == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.MatchLabels, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchExpressions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LabelSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LabelSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "matchLabels":
+ if r.TryDecodeAsNil() {
+ x.MatchLabels = nil
+ } else {
+ yyv4 := &x.MatchLabels
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv4, false, d)
+ }
+ }
+ case "matchExpressions":
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv6 := &x.MatchExpressions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LabelSelector) 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.MatchLabels = nil
+ } else {
+ yyv9 := &x.MatchLabels
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecMapStringStringX(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.MatchExpressions = nil
+ } else {
+ yyv11 := &x.MatchExpressions
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(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 *LabelSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } 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 *LabelSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LabelSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ 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 {
+ x.Key = string(r.DecodeString())
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ x.Operator = LabelSelectorOperator(r.DecodeString())
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv6 := &x.Values
+ 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 *LabelSelectorRequirement) 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.Key = ""
+ } else {
+ x.Key = string(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.Operator = ""
+ } else {
+ x.Operator = LabelSelectorOperator(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.Values = nil
+ } else {
+ yyv11 := &x.Values
+ 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 LabelSelectorOperator) 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 *LabelSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicaSetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicaSetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = ReplicaSetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = ReplicaSetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceReplicaSet((*[]ReplicaSet)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceReplicaSet((*[]ReplicaSet)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ 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] {
+ 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 {
+ x.Selector.CodecEncodeSelf(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 {
+ x.Selector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ 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_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 "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.CodecDecodeSelf(d)
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv7 := &x.Template
+ yyv7.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 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.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = 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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(LabelSelector)
+ }
+ x.Selector.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.Template = pkg2_v1.PodTemplateSpec{}
+ } else {
+ yyv12 := &x.Template
+ 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 *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 [3]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ObservedGeneration != 0
+ 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] {
+ 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.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ 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 {
+ x.Replicas = int32(r.DecodeInt(32))
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = int32(r.DecodeInt(32))
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 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.Replicas = 0
+ } else {
+ x.Replicas = 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.FullyLabeledReplicas = 0
+ } else {
+ x.FullyLabeledReplicas = 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.ObservedGeneration = 0
+ } else {
+ x.ObservedGeneration = int64(r.DecodeInt(64))
+ }
+ 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSecurityPolicySpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Spec = PodSecurityPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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(([]pkg2_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(([]pkg2_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(([]pkg2_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(([]pkg2_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(([]pkg2_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(([]pkg2_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 {
+ x.Privileged = bool(r.DecodeBool())
+ }
+ case "defaultAddCapabilities":
+ if r.TryDecodeAsNil() {
+ x.DefaultAddCapabilities = nil
+ } else {
+ yyv5 := &x.DefaultAddCapabilities
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv5), d)
+ }
+ }
+ case "requiredDropCapabilities":
+ if r.TryDecodeAsNil() {
+ x.RequiredDropCapabilities = nil
+ } else {
+ yyv7 := &x.RequiredDropCapabilities
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv7), d)
+ }
+ }
+ case "allowedCapabilities":
+ if r.TryDecodeAsNil() {
+ x.AllowedCapabilities = nil
+ } else {
+ yyv9 := &x.AllowedCapabilities
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv9), d)
+ }
+ }
+ case "volumes":
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv11 := &x.Volumes
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv11), d)
+ }
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(r.DecodeBool())
+ }
+ case "hostPorts":
+ if r.TryDecodeAsNil() {
+ x.HostPorts = nil
+ } else {
+ yyv14 := &x.HostPorts
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv14), d)
+ }
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ x.HostPID = bool(r.DecodeBool())
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ x.HostIPC = bool(r.DecodeBool())
+ }
+ case "seLinux":
+ if r.TryDecodeAsNil() {
+ x.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv18 := &x.SELinux
+ yyv18.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ x.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv19 := &x.RunAsUser
+ yyv19.CodecDecodeSelf(d)
+ }
+ case "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv20 := &x.SupplementalGroups
+ yyv20.CodecDecodeSelf(d)
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ x.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv21 := &x.FSGroup
+ yyv21.CodecDecodeSelf(d)
+ }
+ case "readOnlyRootFilesystem":
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyRootFilesystem = false
+ } else {
+ x.ReadOnlyRootFilesystem = bool(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 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.Privileged = false
+ } else {
+ x.Privileged = bool(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.DefaultAddCapabilities = nil
+ } else {
+ yyv25 := &x.DefaultAddCapabilities
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv25), 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.RequiredDropCapabilities = nil
+ } else {
+ yyv27 := &x.RequiredDropCapabilities
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv27), 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.AllowedCapabilities = nil
+ } else {
+ yyv29 := &x.AllowedCapabilities
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv29), 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.Volumes = nil
+ } else {
+ yyv31 := &x.Volumes
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv31), 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.HostNetwork = false
+ } else {
+ x.HostNetwork = bool(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.HostPorts = nil
+ } else {
+ yyv34 := &x.HostPorts
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv34), 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.HostPID = false
+ } else {
+ x.HostPID = bool(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.HostIPC = false
+ } else {
+ x.HostIPC = bool(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.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv38 := &x.SELinux
+ yyv38.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.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv39 := &x.RunAsUser
+ yyv39.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.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv40 := &x.SupplementalGroups
+ 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.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv41 := &x.FSGroup
+ yyv41.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.ReadOnlyRootFilesystem = false
+ } else {
+ x.ReadOnlyRootFilesystem = bool(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 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 {
+ x.Min = int32(r.DecodeInt(32))
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ x.Max = 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 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.Min = 0
+ } else {
+ x.Min = int32(r.DecodeInt(32))
+ }
+ 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.Max = 0
+ } else {
+ x.Max = 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 *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 {
+ x.Rule = SELinuxStrategy(r.DecodeString())
+ }
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(pkg2_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 {
+ x.Rule = SELinuxStrategy(r.DecodeString())
+ }
+ 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(pkg2_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 {
+ x.Rule = RunAsUserStrategy(r.DecodeString())
+ }
+ 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 {
+ x.Rule = RunAsUserStrategy(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.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 {
+ x.Min = int64(r.DecodeInt(64))
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ x.Max = 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 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.Min = 0
+ } else {
+ x.Min = int64(r.DecodeInt(64))
+ }
+ 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.Max = 0
+ } else {
+ x.Max = 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 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 {
+ x.Rule = FSGroupStrategyType(r.DecodeString())
+ }
+ 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 {
+ x.Rule = FSGroupStrategyType(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.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 {
+ x.Rule = SupplementalGroupsStrategyType(r.DecodeString())
+ }
+ 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 {
+ x.Rule = SupplementalGroupsStrategyType(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.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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = NetworkPolicySpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv9 := &x.ObjectMeta
+ 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.Spec = NetworkPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSelector
+ yy6.CodecEncodeSelf(e)
+ }
+ 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 = LabelSelector{}
+ } else {
+ yyv4 := &x.PodSelector
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv5 := &x.Ingress
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv5), 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 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.PodSelector = LabelSelector{}
+ } else {
+ yyv8 := &x.PodSelector
+ 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.Ingress = nil
+ } else {
+ yyv9 := &x.Ingress
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(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 *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(pkg2_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(pkg2_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 {
+ x.PodSelector.CodecEncodeSelf(e)
+ }
+ } 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 {
+ x.PodSelector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ x.NamespaceSelector.CodecEncodeSelf(e)
+ }
+ } 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 {
+ x.NamespaceSelector.CodecEncodeSelf(e)
+ }
+ }
+ }
+ 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(LabelSelector)
+ }
+ x.PodSelector.CodecDecodeSelf(d)
+ }
+ case "namespaceSelector":
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(LabelSelector)
+ }
+ x.NamespaceSelector.CodecDecodeSelf(d)
+ }
+ 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 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.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(LabelSelector)
+ }
+ x.PodSelector.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.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(LabelSelector)
+ }
+ x.NamespaceSelector.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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg1_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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) 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, 360)
+ 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
+ }
+}
+
+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, 280)
+ 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) 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, 792)
+ 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, 720)
+ 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, 264)
+ 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) 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, 792)
+ 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
+ }
+}
+
+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, 320)
+ 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) encSliceLabelSelectorRequirement(v []LabelSelectorRequirement, 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) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequirement, 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 = []LabelSelectorRequirement{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[: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([]LabelSelectorRequirement, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LabelSelectorRequirement, 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] = LabelSelectorRequirement{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LabelSelectorRequirement{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LabelSelectorRequirement{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LabelSelectorRequirement{}) // var yyz1 LabelSelectorRequirement
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LabelSelectorRequirement{}
+ } 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 = []LabelSelectorRequirement{}
+ 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, 728)
+ 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) encSlicev1_Capability(v []pkg2_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 *[]pkg2_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 = []pkg2_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([]pkg2_v1.Capability, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_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 {
+ yyv1[yyj1] = pkg2_v1.Capability(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = pkg2_v1.Capability(r.DecodeString())
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 pkg2_v1.Capability
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = pkg2_v1.Capability(r.DecodeString())
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg2_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 {
+ yyv1[yyj1] = FSType(r.DecodeString())
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv1[yyj1] = FSType(r.DecodeString())
+ }
+
+ }
+ }
+
+ } 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 {
+ yyv1[yyj1] = FSType(r.DecodeString())
+ }
+
+ } 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, 536)
+ 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, 296)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go
new file mode 100644
index 0000000..55719fd
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go
@@ -0,0 +1,1198 @@
+/*
+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/kubernetes/pkg/api/resource"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ 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://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// Dummy definition
+type ReplicationControllerDummy struct {
+ unversioned.TypeMeta `json:",inline"`
+}
+
+// SubresourceReference contains enough information to let you inspect or modify the referred subresource.
+type SubresourceReference struct {
+ // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
+ Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
+ // Subresource name of the referent
+ Subresource string `json:"subresource,omitempty" protobuf:"bytes,4,opt,name=subresource"`
+}
+
+type CPUTargetUtilization struct {
+ // fraction of the requested CPU that should be utilized/used,
+ // e.g. 70 means that 70% of the requested CPU should be in use.
+ TargetPercentage int32 `json:"targetPercentage" protobuf:"varint,1,opt,name=targetPercentage"`
+}
+
+// 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"`
+}
+
+// specification of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status,
+ // and will set the desired number of pods by modifying its spec.
+ ScaleRef SubresourceReference `json:"scaleRef" protobuf:"bytes,1,opt,name=scaleRef"`
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ 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 it defaults to the target CPU utilization at 80% of the requested resources.
+ CPUUtilization *CPUTargetUtilization `json:"cpuUtilization,omitempty" protobuf:"bytes,4,opt,name=cpuUtilization"`
+}
+
+// current status of a horizontal pod autoscaler
+type HorizontalPodAutoscalerStatus struct {
+ // most recent generation observed by this autoscaler.
+ 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.
+ LastScaleTime *unversioned.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.
+ CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
+}
+
+// +genclient=true
+
+// configuration of a horizontal pod autoscaler.
+type HorizontalPodAutoscaler struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current information about the autoscaler.
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ unversioned.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"`
+}
+
+// +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 {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Standard object metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Description is the description of this object.
+ Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"`
+
+ // Versions are versions for this third party object
+ Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"`
+}
+
+// ThirdPartyResourceList is a list of ThirdPartyResources.
+type ThirdPartyResourceList struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ unversioned.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').
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data is the raw JSON data for this data.
+ Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
+}
+
+// +genclient=true
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+type Deployment struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the Deployment.
+ Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the Deployment.
+ 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.
+ 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.
+ Selector *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.
+ 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)
+ 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.
+ 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.
+ 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.
+ RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ unversioned.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
+ 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, rollbck to the last revision.
+ 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.
+ 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.
+ 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 up.
+ // 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.
+ 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.
+ 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.
+ 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).
+ 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.
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
+
+ // Total number of unavailable pods targeted by this deployment.
+ UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
+}
+
+// DeploymentList is a list of Deployments.
+type DeploymentList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ unversioned.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"`
+}
+
+// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
+/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out.
+type DaemonSetUpdateStrategy struct {
+ // Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
+ Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
+
+ // Rolling update config params. Present only if DaemonSetUpdateStrategy =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as DeploymentStrategy.RollingUpdate.
+ RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
+}
+
+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"
+)
+
+// 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%, 30% of the currently running DaemonSet
+ // pods can be stopped for an update at any given time. The update starts
+ // by stopping at most 30% of the currently running DaemonSet pods and then
+ // brings up new DaemonSet pods in their place. Once the new pods are ready,
+ // 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.
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
+
+ // 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).
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
+}
+*/
+
+// DaemonSetSpec is the specification of a daemon set.
+type DaemonSetSpec struct {
+ // Selector is 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // Template is the 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
+
+ // TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
+ /* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out.
+ // Update strategy to replace existing DaemonSet pods with new pods.
+ UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
+
+ // Label key that is added to DaemonSet pods to distinguish between old and
+ // new pod templates during DaemonSet update.
+ // Users can set this to an empty string to indicate that the system should
+ // not add any label. If unspecified, system uses
+ // DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash").
+ // Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
+ // No label is added if this is set to empty string.
+ UniqueLabelKey *string `json:"uniqueLabelKey,omitempty"`
+ */
+}
+
+const (
+ // DefaultDaemonSetUniqueLabelKey is the default key of the labels that is added
+ // to daemon set pods to distinguish between old and new pod templates during
+ // DaemonSet update. See DaemonSetSpec's UniqueLabelKey field for more information.
+ DefaultDaemonSetUniqueLabelKey string = "daemonset.kubernetes.io/podTemplateHash"
+)
+
+// DaemonSetStatus represents the current status of a daemon set.
+type DaemonSetStatus struct {
+ // CurrentNumberScheduled is the number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
+ CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
+
+ // NumberMisscheduled is the number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
+ NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
+
+ // DesiredNumberScheduled is the total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
+ DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
+}
+
+// +genclient=true
+
+// DaemonSet represents the configuration of a daemon set.
+type DaemonSet struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired behavior of this daemon set.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// DaemonSetList is a collection of daemon sets.
+type DaemonSetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of daemon sets.
+ Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
+type ThirdPartyResourceDataList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.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
+
+// Job represents the configuration of a single job.
+type Job struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is a structure defining the expected behavior of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is a structure describing current status of a job.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Job.
+ Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
+
+ // 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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ 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
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
+
+ // Selector is a label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
+
+ // AutoSelector controls generation of pod labels and pod selectors.
+ // It was not present in the original extensions/v1beta1 Job definition, but exists
+ // to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite
+ // meaning as, ManualSelector.
+ // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
+ AutoSelector *bool `json:"autoSelector,omitempty" protobuf:"varint,5,opt,name=autoSelector"`
+
+ // Template is the object that describes the pod that will be created when
+ // executing a job.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+
+ // Conditions represent the latest available observations of an object's current state.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
+
+ // StartTime represents time when the job was acknowledged by the Job Manager.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
+
+ // 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.
+ CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
+
+ // Active is the number of actively running pods.
+ Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
+
+ // Succeeded is the number of pods which reached Phase Succeeded.
+ Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
+
+ // Failed is the number of pods which reached Phase Failed.
+ 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.
+ LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transit from one status to another.
+ LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+// +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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is the desired state of the Ingress.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the current state of the Ingress.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// IngressList is a collection of Ingress.
+type IngressList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.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.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+
+ 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 a 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.
+ 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"`
+}
+
+// ExportOptions is the query options to the standard REST get call.
+type ExportOptions struct {
+ unversioned.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"`
+}
+
+// ListOptions is the query options to a standard REST list call.
+type ListOptions struct {
+ unversioned.TypeMeta `json:",inline"`
+
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ 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.
+ FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"`
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ 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.
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
+ // Timeout for the list/watch call.
+ TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"`
+}
+
+// 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.
+ 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.
+ 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.
+ 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.
+ 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"
+)
+
+// +genclient=true
+
+// ReplicaSet represents the configuration of a ReplicaSet.
+type ReplicaSet struct {
+ unversioned.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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the specification of the desired behavior of the ReplicaSet.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
+ Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+type ReplicaSetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ReplicaSets.
+ // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ 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 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
+ Selector *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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template
+ 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
+ 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.
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
+
+ // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
+}
+
+// +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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec defines the policy enforced.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
+ // hostPorts determines which host port ranges are allowed to be exposed.
+ 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.
+ 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.
+ 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.
+ 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"
+ 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: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
+ 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.
+ 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.
+ 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.
+ 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.
+ 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.
+ 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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.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"`
+}
+
+type NetworkPolicy struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ 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 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 namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it,
+ // 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 affect ingress isolation.
+ // If this field is present and contains at least one rule, this policy allows any traffic
+ // which matches at least one of the ingress rules in this list.
+ 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 not provided, this rule matches all ports (traffic not restricted by port).
+ // If this field is empty, this rule matches no ports (no traffic matches).
+ // 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.
+ // TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
+ 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 not provided, this rule matches all sources (traffic not restricted by source).
+ // If this field is empty, this rule matches no sources (no traffic matches).
+ // 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.
+ // TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
+ 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.
+ 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.
+ 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 not provided, this selector selects no pods.
+ // If present but empty, this selector selects all pods in this namespace.
+ PodSelector *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 omitted, this selector selects no namespaces.
+ // If present but empty, this selector selects all namespaces.
+ NamespaceSelector *LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
+}
+
+// Network Policy List is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..182ff78
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,740 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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_CPUTargetUtilization = map[string]string{
+ "targetPercentage": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use.",
+}
+
+func (CPUTargetUtilization) SwaggerDoc() map[string]string {
+ return map_CPUTargetUtilization
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status is 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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is 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": "Selector is 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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors",
+ "template": "Template is the 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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template",
+}
+
+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": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md",
+ "numberMisscheduled": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md",
+ "desiredNumberScheduled": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md",
+}
+
+func (DaemonSetStatus) SwaggerDoc() map[string]string {
+ return map_DaemonSetStatus
+}
+
+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_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.",
+}
+
+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.",
+ "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.",
+}
+
+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_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_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 a 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_HorizontalPodAutoscaler = map[string]string{
+ "": "configuration of a horizontal pod autoscaler.",
+ "metadata": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.",
+ "status": "current information about the autoscaler.",
+}
+
+func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscaler
+}
+
+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.",
+ "scaleRef": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec.",
+ "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.",
+ "cpuUtilization": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources.",
+}
+
+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_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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec is the desired state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the current state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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_Job = map[string]string{
+ "": "Job represents the configuration of a single job.",
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+ "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is the list of Job.",
+}
+
+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": "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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "completions": "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: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "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": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors",
+ "autoSelector": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md",
+ "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+}
+
+func (JobSpec) SwaggerDoc() map[string]string {
+ return map_JobSpec
+}
+
+var map_JobStatus = map[string]string{
+ "": "JobStatus represents the current state of a Job.",
+ "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md",
+ "startTime": "StartTime represents time when the job was acknowledged by the Job Manager. 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": "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": "Active is the number of actively running pods.",
+ "succeeded": "Succeeded is the number of pods which reached Phase Succeeded.",
+ "failed": "Failed is the number of pods which reached Phase Failed.",
+}
+
+func (JobStatus) SwaggerDoc() map[string]string {
+ return map_JobStatus
+}
+
+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_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.",
+ "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.",
+ "timeoutSeconds": "Timeout for the list/watch call.",
+}
+
+func (ListOptions) SwaggerDoc() map[string]string {
+ return map_ListOptions
+}
+
+var map_NetworkPolicy = map[string]string{
+ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/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 not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). 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 not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). 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: http://releases.k8s.io/HEAD/docs/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 not provided, this selector selects no pods. 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 omitted, this selector selects no namespaces. 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 namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, 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 affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list.",
+}
+
+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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: http://releases.k8s.io/HEAD/docs/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
+}
+
+func (ReplicaSet) SwaggerDoc() map[string]string {
+ return map_ReplicaSet
+}
+
+var map_ReplicaSetList = map[string]string{
+ "": "ReplicaSetList is a collection of ReplicaSets.",
+ "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "items": "List of ReplicaSets. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md",
+}
+
+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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
+ "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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors",
+ "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#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: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
+ "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.",
+ "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.",
+}
+
+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, rollbck 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 up. 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: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context",
+}
+
+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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/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://releases.k8s.io/HEAD/docs/user-guide/labels.md#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: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+var map_SubresourceReference = map[string]string{
+ "": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.",
+ "kind": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "name": "Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
+ "apiVersion": "API version of the referent",
+ "subresource": "Subresource name of the referent",
+}
+
+func (SubresourceReference) SwaggerDoc() map[string]string {
+ return map_SubresourceReference
+}
+
+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: http://releases.k8s.io/HEAD/docs/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go
new file mode 100644
index 0000000..098a0ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go
@@ -0,0 +1,90 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_policy_PodDisruptionBudget,
+ DeepCopy_policy_PodDisruptionBudgetList,
+ DeepCopy_policy_PodDisruptionBudgetSpec,
+ DeepCopy_policy_PodDisruptionBudgetStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_policy_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_policy_PodDisruptionBudgetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_policy_PodDisruptionBudgetList(in PodDisruptionBudgetList, out *PodDisruptionBudgetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_policy_PodDisruptionBudgetSpec(in PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, c *conversion.Cloner) error {
+ out.MinAvailable = in.MinAvailable
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func DeepCopy_policy_PodDisruptionBudgetStatus(in PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, c *conversion.Cloner) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go
new file mode 100644
index 0000000..876858c
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go
new file mode 100644
index 0000000..90489a7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go
@@ -0,0 +1,129 @@
+/*
+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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/policy"
+ "k8s.io/kubernetes/pkg/apis/policy/v1alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/policy"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", policy.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) 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()
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(policy.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ policy.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1alpha1.SchemeGroupVersion:
+ v1alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go
new file mode 100644
index 0000000..e61c82b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/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 policy
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go
new file mode 100644
index 0000000..0665268
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go
@@ -0,0 +1,1440 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 policy
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_api "k8s.io/kubernetes/pkg/api"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg4_types "k8s.io/kubernetes/pkg/types"
+ pkg1_intstr "k8s.io/kubernetes/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_api.ObjectMeta
+ var v1 pkg2_unversioned.LabelSelector
+ var v2 pkg4_types.UID
+ var v3 pkg1_intstr.IntOrString
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = x.Selector != 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] {
+ yy4 := &x.MinAvailable
+ 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 {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minAvailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.MinAvailable
+ 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] {
+ 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_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() {
+ x.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.MinAvailable
+ 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 "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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 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.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.MinAvailable
+ 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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } 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.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ 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 "disruptionAllowed":
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ case "currentHealthy":
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = int32(r.DecodeInt(32))
+ }
+ case "desiredHealthy":
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = int32(r.DecodeInt(32))
+ }
+ case "expectedPods":
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = 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 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.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ 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.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = 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.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = 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.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg3_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 296)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
new file mode 100644
index 0000000..adc31e5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
@@ -0,0 +1,71 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // The minimum number of pods that must be available simultaneously. This
+ // can be either an integer or a string specifying a percentage, e.g. "28%".
+ MinAvailable intstr.IntOrString `json:"minAvailable,omitempty"`
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Whether or not a disruption is currently allowed.
+ PodDisruptionAllowed bool `json:"disruptionAllowed"`
+
+ // current number of healthy pods
+ CurrentHealthy int32 `json:"currentHealthy"`
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32 `json:"desiredHealthy"`
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32 `json:"expectedPods"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ Spec PodDisruptionBudgetSpec `json:"spec,omitempty"`
+ // Most recently observed status of the PodDisruptionBudget.
+ Status PodDisruptionBudgetStatus `json:"status,omitempty"`
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+ Items []PodDisruptionBudget `json:"items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go
new file mode 100644
index 0000000..c524ca2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go
@@ -0,0 +1,183 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ policy "k8s.io/kubernetes/pkg/apis/policy"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget,
+ Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget,
+ Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList,
+ Convert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList,
+ Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec,
+ Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec,
+ Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus,
+ Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]policy.PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.MinAvailable, &out.MinAvailable, s); err != nil {
+ return err
+ }
+ out.Selector = in.Selector
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.MinAvailable, &out.MinAvailable, s); err != nil {
+ return err
+ }
+ out.Selector = in.Selector
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..05f286d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go
@@ -0,0 +1,91 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1alpha1_PodDisruptionBudget,
+ DeepCopy_v1alpha1_PodDisruptionBudgetList,
+ DeepCopy_v1alpha1_PodDisruptionBudgetSpec,
+ DeepCopy_v1alpha1_PodDisruptionBudgetStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudgetList(in PodDisruptionBudgetList, out *PodDisruptionBudgetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(in))
+ for i := range in {
+ if err := DeepCopy_v1alpha1_PodDisruptionBudget(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, c *conversion.Cloner) error {
+ out.MinAvailable = in.MinAvailable
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudgetStatus(in PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, c *conversion.Cloner) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go
new file mode 100644
index 0000000..985d4bb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/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/policy
+
+// Package policy is for any kind of policy object. Suitable examples, even if
+// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
+// NetworkPolicy, etc.
+package v1alpha1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go
new file mode 100644
index 0000000..7a4c999
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go
@@ -0,0 +1,903 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/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/policy/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PodDisruptionBudget
+ PodDisruptionBudgetList
+ PodDisruptionBudgetSpec
+ PodDisruptionBudgetStatus
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} }
+func (m *PodDisruptionBudget) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudget) ProtoMessage() {}
+
+func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} }
+func (m *PodDisruptionBudgetList) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudgetList) ProtoMessage() {}
+
+func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} }
+func (m *PodDisruptionBudgetSpec) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudgetSpec) ProtoMessage() {}
+
+func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} }
+func (m *PodDisruptionBudgetStatus) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudgetStatus) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudget")
+ proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetList")
+ proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetSpec")
+ proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetStatus")
+}
+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()))
+ 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 *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()))
+ 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 *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
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.MinAvailable.Size()))
+ n5, err := m.MinAvailable.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if m.Selector != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size()))
+ n6, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ 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++
+ if m.PodDisruptionAllowed {
+ data[i] = 1
+ } else {
+ data[i] = 0
+ }
+ i++
+ data[i] = 0x10
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.CurrentHealthy))
+ data[i] = 0x18
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.DesiredHealthy))
+ data[i] = 0x20
+ 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 *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
+ l = m.MinAvailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ 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 (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 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_kubernetes_pkg_api_unversioned.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ 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 PodDisruptionAllowed", 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.PodDisruptionAllowed = bool(v != 0)
+ case 2:
+ 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 3:
+ 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 4:
+ 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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto
new file mode 100644
index 0000000..d04a0af
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto
@@ -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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.policy.v1alpha1;
+
+import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+message PodDisruptionBudget {
+ optional k8s.io.kubernetes.pkg.api.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.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ repeated PodDisruptionBudget items = 2;
+}
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+message PodDisruptionBudgetSpec {
+ // The minimum number of pods that must be available simultaneously. This
+ // can be either an integer or a string specifying a percentage, e.g. "28%".
+ optional k8s.io.kubernetes.pkg.util.intstr.IntOrString minAvailable = 1;
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2;
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+message PodDisruptionBudgetStatus {
+ // Whether or not a disruption is currently allowed.
+ optional bool disruptionAllowed = 1;
+
+ // current number of healthy pods
+ optional int32 currentHealthy = 2;
+
+ // minimum desired number of healthy pods
+ optional int32 desiredHealthy = 3;
+
+ // total number of pods counted by this disruption budget
+ optional int32 expectedPods = 4;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go
new file mode 100644
index 0000000..6a82e3f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/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 v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ /*
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+ */
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+ // Add the watch version that applies
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go
new file mode 100644
index 0000000..6592c9c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go
@@ -0,0 +1,1440 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg4_types "k8s.io/kubernetes/pkg/types"
+ pkg1_intstr "k8s.io/kubernetes/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_unversioned.LabelSelector
+ var v1 pkg3_v1.ObjectMeta
+ var v2 pkg4_types.UID
+ var v3 pkg1_intstr.IntOrString
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+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 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = x.Selector != 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] {
+ yy4 := &x.MinAvailable
+ 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 {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minAvailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.MinAvailable
+ 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] {
+ 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_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() {
+ x.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.MinAvailable
+ 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 "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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 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.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.MinAvailable
+ 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() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, 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 *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 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } 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.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ 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 "disruptionAllowed":
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ case "currentHealthy":
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = int32(r.DecodeInt(32))
+ }
+ case "desiredHealthy":
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = int32(r.DecodeInt(32))
+ }
+ case "expectedPods":
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = 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 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.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ 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.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = 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.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = 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.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = 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 *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] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.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.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv12 := &x.Status
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 296)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go
new file mode 100644
index 0000000..efe136f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.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 v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // The minimum number of pods that must be available simultaneously. This
+ // can be either an integer or a string specifying a percentage, e.g. "28%".
+ 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 *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Whether or not a disruption is currently allowed.
+ PodDisruptionAllowed bool `json:"disruptionAllowed" protobuf:"varint,1,opt,name=disruptionAllowed"`
+
+ // current number of healthy pods
+ CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"`
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"`
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32 `json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ unversioned.TypeMeta `json:",inline"`
+ v1.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 {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..b12ce0f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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_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": "The minimum number of pods that must be available simultaneously. This can be either an integer or a string specifying a percentage, e.g. \"28%\".",
+ "selector": "Label query over pods whose evictions are managed by the disruption budget.",
+}
+
+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.",
+ "disruptionAllowed": "Whether or not a disruption is 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go
new file mode 100644
index 0000000..10d8c40
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/deep_copy_generated.go
@@ -0,0 +1,241 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ runtime "k8s.io/kubernetes/pkg/runtime"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_rbac_ClusterRole,
+ DeepCopy_rbac_ClusterRoleBinding,
+ DeepCopy_rbac_ClusterRoleBindingList,
+ DeepCopy_rbac_ClusterRoleList,
+ DeepCopy_rbac_PolicyRule,
+ DeepCopy_rbac_Role,
+ DeepCopy_rbac_RoleBinding,
+ DeepCopy_rbac_RoleBindingList,
+ DeepCopy_rbac_RoleList,
+ DeepCopy_rbac_Subject,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_rbac_ClusterRole(in ClusterRole, out *ClusterRole, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_ClusterRoleBinding(in ClusterRoleBinding, out *ClusterRoleBinding, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Subjects != nil {
+ in, out := in.Subjects, &out.Subjects
+ *out = make([]Subject, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Subjects = nil
+ }
+ out.RoleRef = in.RoleRef
+ return nil
+}
+
+func DeepCopy_rbac_ClusterRoleBindingList(in ClusterRoleBindingList, out *ClusterRoleBindingList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_rbac_ClusterRoleBinding(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_ClusterRoleList(in ClusterRoleList, out *ClusterRoleList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_PolicyRule(in PolicyRule, out *PolicyRule, c *conversion.Cloner) error {
+ if in.Verbs != nil {
+ in, out := in.Verbs, &out.Verbs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Verbs = nil
+ }
+ if in.AttributeRestrictions == nil {
+ out.AttributeRestrictions = nil
+ } else if newVal, err := c.DeepCopy(in.AttributeRestrictions); err != nil {
+ return err
+ } else {
+ out.AttributeRestrictions = newVal.(runtime.Object)
+ }
+ if in.APIGroups != nil {
+ in, out := in.APIGroups, &out.APIGroups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.APIGroups = nil
+ }
+ if in.Resources != nil {
+ in, out := in.Resources, &out.Resources
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Resources = nil
+ }
+ if in.ResourceNames != nil {
+ in, out := in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.ResourceNames = nil
+ }
+ if in.NonResourceURLs != nil {
+ in, out := in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.NonResourceURLs = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_Role(in Role, out *Role, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_RoleBinding(in RoleBinding, out *RoleBinding, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Subjects != nil {
+ in, out := in.Subjects, &out.Subjects
+ *out = make([]Subject, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Subjects = nil
+ }
+ out.RoleRef = in.RoleRef
+ return nil
+}
+
+func DeepCopy_rbac_RoleBindingList(in RoleBindingList, out *RoleBindingList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_rbac_RoleBinding(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_RoleList(in RoleList, out *RoleList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_rbac_Subject(in Subject, out *Subject, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.APIVersion = in.APIVersion
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go
new file mode 100644
index 0000000..e4ce69b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+// +groupName=rbac.authorization.k8s.io
+package rbac
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go
new file mode 100644
index 0000000..0f6dc91
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go
@@ -0,0 +1,130 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/rbac"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", rbac.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
+ rootScoped := sets.NewString(
+ "ClusterRole",
+ "ClusterRoleBinding",
+ )
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(rbac.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ rbac.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1alpha1.SchemeGroupVersion:
+ v1alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go
new file mode 100644
index 0000000..5d89656
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go
@@ -0,0 +1,64 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+
+ &api.ListOptions{},
+ &api.DeleteOptions{},
+ &api.ExportOptions{},
+ )
+ versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go
new file mode 100644
index 0000000..44a3897
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go
@@ -0,0 +1,178 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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"
+
+ UserAll = "*"
+)
+
+// 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
+ // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
+ // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
+ AttributeRestrictions runtime.Object
+ // 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.
+ 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
+ // APIVersion holds the API group and version of the referenced object. For non-object references such as "Group" and "User" this is
+ // expected to be API version of this API group. For example "rbac/v1alpha1".
+ APIVersion 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
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ api.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 {
+ unversioned.TypeMeta
+ api.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 api.ObjectReference
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ unversioned.ListMeta
+
+ // Items is a list of roleBindings
+ Items []RoleBinding
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ unversioned.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 {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ api.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 {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ api.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 api.ObjectReference
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ unversioned.ListMeta
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ unversioned.TypeMeta
+ // Standard object's metadata.
+ unversioned.ListMeta
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go
new file mode 100644
index 0000000..5588146
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion_generated.go
@@ -0,0 +1,536 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ rbac "k8s.io/kubernetes/pkg/apis/rbac"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ runtime "k8s.io/kubernetes/pkg/runtime"
+)
+
+func init() {
+ if err := api.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_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_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_Subject_To_rbac_Subject,
+ Convert_rbac_Subject_To_v1alpha1_Subject,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]rbac.PolicyRule, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+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_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]rbac.ClusterRole, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 = in.Verbs
+ if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil {
+ return err
+ }
+ out.APIGroups = in.APIGroups
+ out.Resources = in.Resources
+ out.ResourceNames = in.ResourceNames
+ out.NonResourceURLs = in.NonResourceURLs
+ return nil
+}
+
+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 {
+ out.Verbs = in.Verbs
+ if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil {
+ return err
+ }
+ out.APIGroups = in.APIGroups
+ out.Resources = in.Resources
+ out.ResourceNames = in.ResourceNames
+ out.NonResourceURLs = in.NonResourceURLs
+ return nil
+}
+
+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_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]rbac.PolicyRule, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.RoleRef, &out.RoleRef, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ 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 = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]rbac.Role, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_Role_To_rbac_Role(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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 {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_Role_To_v1alpha1_Role(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+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_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.APIVersion = in.APIVersion
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s)
+}
+
+func autoConvert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.APIVersion = in.APIVersion
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+func Convert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ return autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..3f0e1eb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/deep_copy_generated.go
@@ -0,0 +1,238 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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 (
+ api "k8s.io/kubernetes/pkg/api"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+ runtime "k8s.io/kubernetes/pkg/runtime"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1alpha1_ClusterRole,
+ DeepCopy_v1alpha1_ClusterRoleBinding,
+ DeepCopy_v1alpha1_ClusterRoleBindingList,
+ DeepCopy_v1alpha1_ClusterRoleList,
+ DeepCopy_v1alpha1_PolicyRule,
+ DeepCopy_v1alpha1_Role,
+ DeepCopy_v1alpha1_RoleBinding,
+ DeepCopy_v1alpha1_RoleBindingList,
+ DeepCopy_v1alpha1_RoleList,
+ DeepCopy_v1alpha1_Subject,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1alpha1_ClusterRole(in ClusterRole, out *ClusterRole, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_ClusterRoleBinding(in ClusterRoleBinding, out *ClusterRoleBinding, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Subjects != nil {
+ in, out := in.Subjects, &out.Subjects
+ *out = make([]Subject, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Subjects = nil
+ }
+ out.RoleRef = in.RoleRef
+ return nil
+}
+
+func DeepCopy_v1alpha1_ClusterRoleBindingList(in ClusterRoleBindingList, out *ClusterRoleBindingList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1alpha1_ClusterRoleBinding(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_ClusterRoleList(in ClusterRoleList, out *ClusterRoleList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PolicyRule(in PolicyRule, out *PolicyRule, c *conversion.Cloner) error {
+ if in.Verbs != nil {
+ in, out := in.Verbs, &out.Verbs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Verbs = nil
+ }
+ if err := runtime.DeepCopy_runtime_RawExtension(in.AttributeRestrictions, &out.AttributeRestrictions, c); err != nil {
+ return err
+ }
+ if in.APIGroups != nil {
+ in, out := in.APIGroups, &out.APIGroups
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.APIGroups = nil
+ }
+ if in.Resources != nil {
+ in, out := in.Resources, &out.Resources
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.Resources = nil
+ }
+ if in.ResourceNames != nil {
+ in, out := in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.ResourceNames = nil
+ }
+ if in.NonResourceURLs != nil {
+ in, out := in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(in))
+ copy(*out, in)
+ } else {
+ out.NonResourceURLs = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_Role(in Role, out *Role, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ 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
+ }
+ }
+ } else {
+ out.Rules = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_RoleBinding(in RoleBinding, out *RoleBinding, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if in.Subjects != nil {
+ in, out := in.Subjects, &out.Subjects
+ *out = make([]Subject, len(in))
+ for i := range in {
+ (*out)[i] = in[i]
+ }
+ } else {
+ out.Subjects = nil
+ }
+ out.RoleRef = in.RoleRef
+ return nil
+}
+
+func DeepCopy_v1alpha1_RoleBindingList(in RoleBindingList, out *RoleBindingList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ 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 := DeepCopy_v1alpha1_RoleBinding(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_RoleList(in RoleList, out *RoleList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ 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
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_Subject(in Subject, out *Subject, c *conversion.Cloner) error {
+ out.Kind = in.Kind
+ out.APIVersion = in.APIVersion
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go
new file mode 100644
index 0000000..e471bd3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
+
+package v1alpha1
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go
new file mode 100644
index 0000000..fb917c3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go
@@ -0,0 +1,2209 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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
+ ClusterRoleBindingList
+ ClusterRoleList
+ PolicyRule
+ Role
+ RoleBinding
+ RoleBindingList
+ RoleList
+ Subject
+*/
+package v1alpha1
+
+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
+
+func (m *ClusterRole) Reset() { *m = ClusterRole{} }
+func (m *ClusterRole) String() string { return proto.CompactTextString(m) }
+func (*ClusterRole) ProtoMessage() {}
+
+func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
+func (m *ClusterRoleBinding) String() string { return proto.CompactTextString(m) }
+func (*ClusterRoleBinding) ProtoMessage() {}
+
+func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
+func (m *ClusterRoleBindingList) String() string { return proto.CompactTextString(m) }
+func (*ClusterRoleBindingList) ProtoMessage() {}
+
+func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
+func (m *ClusterRoleList) String() string { return proto.CompactTextString(m) }
+func (*ClusterRoleList) ProtoMessage() {}
+
+func (m *PolicyRule) Reset() { *m = PolicyRule{} }
+func (m *PolicyRule) String() string { return proto.CompactTextString(m) }
+func (*PolicyRule) ProtoMessage() {}
+
+func (m *Role) Reset() { *m = Role{} }
+func (m *Role) String() string { return proto.CompactTextString(m) }
+func (*Role) ProtoMessage() {}
+
+func (m *RoleBinding) Reset() { *m = RoleBinding{} }
+func (m *RoleBinding) String() string { return proto.CompactTextString(m) }
+func (*RoleBinding) ProtoMessage() {}
+
+func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
+func (m *RoleBindingList) String() string { return proto.CompactTextString(m) }
+func (*RoleBindingList) ProtoMessage() {}
+
+func (m *RoleList) Reset() { *m = RoleList{} }
+func (m *RoleList) String() string { return proto.CompactTextString(m) }
+func (*RoleList) ProtoMessage() {}
+
+func (m *Subject) Reset() { *m = Subject{} }
+func (m *Subject) String() string { return proto.CompactTextString(m) }
+func (*Subject) ProtoMessage() {}
+
+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((*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((*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((*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 *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()))
+ 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 *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()))
+ 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 *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)
+ }
+ }
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.AttributeRestrictions.Size()))
+ n6, err := m.AttributeRestrictions.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ 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 *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()))
+ n7, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ 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()))
+ n8, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ 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()))
+ n9, err := m.RoleRef.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ 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()))
+ n10, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ 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()))
+ 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 *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 *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))
+ }
+ }
+ l = m.AttributeRestrictions.Size()
+ 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 *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 *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 (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 *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 AttributeRestrictions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.AttributeRestrictions.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ 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 *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 *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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
new file mode 100644
index 0000000..062f815
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
@@ -0,0 +1,159 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/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 k8s.io.kubernetes.pkg.api.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 k8s.io.kubernetes.pkg.api.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 k8s.io.kubernetes.pkg.api.v1.ObjectReference roleRef = 3;
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+message ClusterRoleBindingList {
+ // Standard object's metadata.
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 k8s.io.kubernetes.pkg.api.unversioned.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;
+
+ // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
+ // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
+ optional k8s.io.kubernetes.pkg.runtime.RawExtension attributeRestrictions = 2;
+
+ // 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.
+ repeated string apiGroups = 3;
+
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ 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.
+ repeated string resourceNames = 5;
+
+ // NonResourceURLsSlice 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.
+ repeated string nonResourceURLs = 6;
+}
+
+// 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 k8s.io.kubernetes.pkg.api.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 k8s.io.kubernetes.pkg.api.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 k8s.io.kubernetes.pkg.api.v1.ObjectReference roleRef = 3;
+}
+
+// RoleBindingList is a collection of RoleBindings
+message RoleBindingList {
+ // Standard object's metadata.
+ optional k8s.io.kubernetes.pkg.api.unversioned.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 k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ // Items is a list of Roles
+ repeated Role items = 2;
+}
+
+// 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 object.
+ 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 string namespace = 4;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go
new file mode 100644
index 0000000..cff4720
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/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 v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: rbac.GroupName, Version: "v1alpha1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ &v1.ExportOptions{},
+ )
+ versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go
new file mode 100644
index 0000000..bf7b3db
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go
@@ -0,0 +1,4327 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg1_runtime "k8s.io/kubernetes/pkg/runtime"
+ pkg4_types "k8s.io/kubernetes/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 pkg2_unversioned.TypeMeta
+ var v1 pkg3_v1.ObjectMeta
+ var v2 pkg1_runtime.RawExtension
+ var v3 pkg4_types.UID
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+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 [6]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = true
+ yyq2[4] = len(x.ResourceNames) != 0
+ yyq2[5] = len(x.NonResourceURLs) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 3
+ 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] {
+ yy7 := &x.AttributeRestrictions
+ 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("attributeRestrictions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.AttributeRestrictions
+ 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 x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceNames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ 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 "attributeRestrictions":
+ if r.TryDecodeAsNil() {
+ x.AttributeRestrictions = pkg1_runtime.RawExtension{}
+ } else {
+ yyv6 := &x.AttributeRestrictions
+ 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 "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv8 := &x.APIGroups
+ 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)
+ }
+ }
+ case "resourceNames":
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv12 := &x.ResourceNames
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ case "nonResourceURLs":
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv14 := &x.NonResourceURLs
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv14, 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 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.Verbs = nil
+ } else {
+ yyv17 := &x.Verbs
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, 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.AttributeRestrictions = pkg1_runtime.RawExtension{}
+ } else {
+ yyv19 := &x.AttributeRestrictions
+ 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)
+ }
+ }
+ 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.APIGroups = nil
+ } else {
+ yyv21 := &x.APIGroups
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv21, 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.Resources = nil
+ } else {
+ yyv23 := &x.Resources
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, 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.ResourceNames = nil
+ } else {
+ yyv25 := &x.ResourceNames
+ 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.NonResourceURLs = nil
+ } else {
+ yyv27 := &x.NonResourceURLs
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv27, false, 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 *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 {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ x.Name = string(r.DecodeString())
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ x.Namespace = string(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 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 {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 {
+ x.Name = string(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.Namespace = ""
+ } else {
+ x.Namespace = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv5 := &x.Rules
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv5), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Rules = nil
+ } else {
+ yyv11 := &x.Rules
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.RoleRef
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.RoleRef
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ 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)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv5 := &x.Subjects
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv5), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = pkg3_v1.ObjectReference{}
+ } else {
+ yyv7 := &x.RoleRef
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Subjects = nil
+ } else {
+ yyv12 := &x.Subjects
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv12), 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.RoleRef = pkg3_v1.ObjectReference{}
+ } else {
+ yyv14 := &x.RoleRef
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceRoleBinding((*[]RoleBinding)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceRoleBinding((*[]RoleBinding)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceRole((*[]Role)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceRole((*[]Role)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv5 := &x.Rules
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv5), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ 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.Rules = nil
+ } else {
+ yyv11 := &x.Rules
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.RoleRef
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.RoleRef
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ 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)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv5 := &x.Subjects
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv5), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = pkg3_v1.ObjectReference{}
+ } else {
+ yyv7 := &x.RoleRef
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv11 := &x.ObjectMeta
+ 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.Subjects = nil
+ } else {
+ yyv12 := &x.Subjects
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv12), 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.RoleRef = pkg3_v1.ObjectReference{}
+ } else {
+ yyv14 := &x.RoleRef
+ 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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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 *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] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ 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] {
+ yy4 := &x.ListMeta
+ 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.ListMeta
+ 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 x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ 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 {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ 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 "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceClusterRole((*[]ClusterRole)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ 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 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.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, 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.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceClusterRole((*[]ClusterRole)(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.Kind = ""
+ } else {
+ x.Kind = string(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 {
+ x.APIVersion = string(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) 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, 160)
+ 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, 376)
+ 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, 264)
+ 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, 376)
+ 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, 264)
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go
new file mode 100644
index 0000000..a260fac
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go
@@ -0,0 +1,165 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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"`
+ // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
+ // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
+ AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"`
+ // 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 `json:"apiGroups" protobuf:"bytes,3,rep,name=apiGroups"`
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ Resources []string `json:"resources" 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.
+ ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
+ // NonResourceURLsSlice 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.
+ 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 object.
+ 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.
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ v1.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ v1.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 v1.ObjectReference `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ v1.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ v1.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 v1.ObjectReference `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ unversioned.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 {
+ unversioned.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..f1c6fdb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,138 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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.",
+ "attributeRestrictions": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.",
+ "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": "NonResourceURLsSlice 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.",
+}
+
+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_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 object.",
+ "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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/doc.go
new file mode 100644
index 0000000..570c51a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/user.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/user.go
new file mode 100644
index 0000000..9926196
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/auth/user/user.go
@@ -0,0 +1,65 @@
+/*
+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
+ 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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go
new file mode 100644
index 0000000..96146c6
--- /dev/null
+++ b/src/kube2msb/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,
+ })
+}
+
+// SetCapabilitiesForTests. 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go
new file mode 100644
index 0000000..b7fa14b
--- /dev/null
+++ b/src/kube2msb/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 capbabilities manages system level capabilities
+package capabilities
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/delta_fifo.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/delta_fifo.go
new file mode 100644
index 0000000..5a7f4a9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/delta_fifo.go
@@ -0,0 +1,613 @@
+/*
+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/kubernetes/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
+}
+
+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")
+)
+
+// 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
+}
+
+// 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 {
+ 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))
+
+ if !f.populated {
+ f.populated = true
+ f.initialPopulationCount = 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
+ }
+ }
+ 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()
+ 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)
+ }
+ if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Resync will send a sync event for each item
+func (f *DeltaFIFO) Resync() error {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ for _, k := range f.knownObjects.ListKeys() {
+ obj, exists, err := f.knownObjects.GetByKey(k)
+ if err != nil {
+ glog.Errorf("Unexpected error %v during lookup of key %v, unable to queue object for sync", err, k)
+ continue
+ } else if !exists {
+ glog.Infof("Key %v does not exist in known objects store, unable to queue object for sync", k)
+ continue
+ }
+
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/doc.go
new file mode 100644
index 0000000..4f593f0
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go
new file mode 100644
index 0000000..8c5c470
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/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/kubernetes/pkg/util"
+)
+
+// 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 util.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 util.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 returnes 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: util.RealClock{},
+ expirationPolicy: &TTLPolicy{ttl, util.RealClock{}},
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go
new file mode 100644
index 0000000..eb1d535
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/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/kubernetes/pkg/util"
+ "k8s.io/kubernetes/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 util.Clock) Store {
+ cacheStorage := NewThreadSafeStore(Indexers{}, Indices{})
+ return &ExpirationCache{
+ cacheStorage: &fakeThreadSafeMap{cacheStorage, deletedKeys},
+ keyFunc: keyFunc,
+ clock: cacheClock,
+ expirationPolicy: expirationPolicy,
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fake_custom_store.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fake_custom_store.go
new file mode 100644
index 0000000..8d71c24
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fifo.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fifo.go
new file mode 100644
index 0000000..a6d5e0a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/fifo.go
@@ -0,0 +1,321 @@
+/*
+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"
+
+ "k8s.io/kubernetes/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
+}
+
+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
+}
+
+// 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
+}
+
+var (
+ _ = Queue(&FIFO{}) // FIFO is a Queue
+)
+
+// 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
+}
+
+// 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 {
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/index.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/index.go
new file mode 100644
index 0000000..4379880
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/index.go
@@ -0,0 +1,82 @@
+/*
+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/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/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)
+ // 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)
+ }
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go
new file mode 100644
index 0000000..29e5859
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go
@@ -0,0 +1,672 @@
+/*
+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"
+
+ "github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/labels"
+)
+
+// TODO: generate these classes and methods for all resources of interest using
+// a script. Can use "go generate" once 1.4 is supported by all users.
+
+// StoreToPodLister makes a Store have the List method of the client.PodInterface
+// The Store must contain (only) Pods.
+//
+// Example:
+// s := cache.NewStore()
+// lw := cache.ListWatch{Client: c, FieldSelector: sel, Resource: "pods"}
+// r := cache.NewReflector(lw, &api.Pod{}, s).Run()
+// l := StoreToPodLister{s}
+// l.List()
+type StoreToPodLister struct {
+ Indexer
+}
+
+// Please note that selector is filtering among the pods that have gotten into
+// the store; there may have been some filtering that already happened before
+// that.
+//
+// TODO: converge on the interface in pkg/client.
+func (s *StoreToPodLister) List(selector labels.Selector) (pods []*api.Pod, err error) {
+ // TODO: it'd be great to just call
+ // s.Pods(api.NamespaceAll).List(selector), however then we'd have to
+ // remake the list.Items as a []*api.Pod. So leave this separate for
+ // now.
+ for _, m := range s.Indexer.List() {
+ pod := m.(*api.Pod)
+ if selector.Matches(labels.Set(pod.Labels)) {
+ pods = append(pods, pod)
+ }
+ }
+ return pods, nil
+}
+
+// Pods is taking baby steps to be more like the api in pkg/client
+func (s *StoreToPodLister) Pods(namespace string) storePodsNamespacer {
+ return storePodsNamespacer{s.Indexer, namespace}
+}
+
+type storePodsNamespacer struct {
+ indexer Indexer
+ namespace string
+}
+
+// Please note that selector is filtering among the pods that have gotten into
+// the store; there may have been some filtering that already happened before
+// that.
+func (s storePodsNamespacer) List(selector labels.Selector) (api.PodList, error) {
+ pods := api.PodList{}
+
+ if s.namespace == api.NamespaceAll {
+ for _, m := range s.indexer.List() {
+ pod := m.(*api.Pod)
+ if selector.Matches(labels.Set(pod.Labels)) {
+ pods.Items = append(pods.Items, *pod)
+ }
+ }
+ return pods, nil
+ }
+
+ key := &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: s.namespace}}
+ items, err := s.indexer.Index(NamespaceIndex, key)
+ 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 s.indexer.List() {
+ pod := m.(*api.Pod)
+ if s.namespace == pod.Namespace && selector.Matches(labels.Set(pod.Labels)) {
+ pods.Items = append(pods.Items, *pod)
+ }
+ }
+ return pods, nil
+ }
+ for _, m := range items {
+ pod := m.(*api.Pod)
+ if selector.Matches(labels.Set(pod.Labels)) {
+ pods.Items = append(pods.Items, *pod)
+ }
+ }
+ return pods, nil
+}
+
+// Exists returns true if a pod matching the namespace/name of the given pod exists in the store.
+func (s *StoreToPodLister) Exists(pod *api.Pod) (bool, error) {
+ _, exists, err := s.Indexer.Get(pod)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// NodeConditionPredicate is a function that indicates whether the given node's conditions meet
+// some set of criteria defined by the function.
+type NodeConditionPredicate func(node *api.Node) bool
+
+// StoreToNodeLister makes a Store have the List method of the client.NodeInterface
+// The Store must contain (only) Nodes.
+type StoreToNodeLister struct {
+ Store
+}
+
+func (s *StoreToNodeLister) List() (machines api.NodeList, err error) {
+ for _, m := range s.Store.List() {
+ machines.Items = append(machines.Items, *(m.(*api.Node)))
+ }
+ return machines, nil
+}
+
+// NodeCondition returns a storeToNodeConditionLister
+func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister {
+ // TODO: Move this filtering server side. Currently our selectors don't facilitate searching through a list so we
+ // have the reflector filter out the Unschedulable field and sift through node conditions in the lister.
+ return storeToNodeConditionLister{s.Store, predicate}
+}
+
+// storeToNodeConditionLister filters and returns nodes matching the given type and status from the store.
+type storeToNodeConditionLister struct {
+ store Store
+ predicate NodeConditionPredicate
+}
+
+// List returns a list of nodes that match the conditions defined by the predicate functions in the storeToNodeConditionLister.
+func (s storeToNodeConditionLister) List() (nodes api.NodeList, err error) {
+ for _, m := range s.store.List() {
+ node := m.(*api.Node)
+ if s.predicate(node) {
+ nodes.Items = append(nodes.Items, *node)
+ } else {
+ glog.V(5).Infof("Node %s matches none of the conditions", node.Name)
+ }
+ }
+ return
+}
+
+// StoreToReplicationControllerLister gives a store List and Exists methods. The store must contain only ReplicationControllers.
+type StoreToReplicationControllerLister struct {
+ Indexer
+}
+
+// Exists checks if the given rc exists in the store.
+func (s *StoreToReplicationControllerLister) Exists(controller *api.ReplicationController) (bool, error) {
+ _, exists, err := s.Indexer.Get(controller)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// StoreToReplicationControllerLister lists all controllers in the store.
+// TODO: converge on the interface in pkg/client
+func (s *StoreToReplicationControllerLister) List() (controllers []api.ReplicationController, err error) {
+ for _, c := range s.Indexer.List() {
+ controllers = append(controllers, *(c.(*api.ReplicationController)))
+ }
+ return controllers, nil
+}
+
+func (s *StoreToReplicationControllerLister) ReplicationControllers(namespace string) storeReplicationControllersNamespacer {
+ return storeReplicationControllersNamespacer{s.Indexer, namespace}
+}
+
+type storeReplicationControllersNamespacer struct {
+ indexer Indexer
+ namespace string
+}
+
+func (s storeReplicationControllersNamespacer) List(selector labels.Selector) ([]api.ReplicationController, error) {
+ controllers := []api.ReplicationController{}
+
+ if s.namespace == api.NamespaceAll {
+ for _, m := range s.indexer.List() {
+ rc := *(m.(*api.ReplicationController))
+ if selector.Matches(labels.Set(rc.Labels)) {
+ controllers = append(controllers, rc)
+ }
+ }
+ return controllers, nil
+ }
+
+ key := &api.ReplicationController{ObjectMeta: api.ObjectMeta{Namespace: s.namespace}}
+ items, err := s.indexer.Index(NamespaceIndex, key)
+ 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 s.indexer.List() {
+ rc := *(m.(*api.ReplicationController))
+ if s.namespace == rc.Namespace && selector.Matches(labels.Set(rc.Labels)) {
+ controllers = append(controllers, rc)
+ }
+ }
+ return controllers, nil
+ }
+ for _, m := range items {
+ rc := *(m.(*api.ReplicationController))
+ if selector.Matches(labels.Set(rc.Labels)) {
+ controllers = append(controllers, rc)
+ }
+ }
+ return controllers, nil
+}
+
+// GetPodControllers returns a list of replication controllers managing a pod. Returns an error only if no matching controllers are found.
+func (s *StoreToReplicationControllerLister) GetPodControllers(pod *api.Pod) (controllers []api.ReplicationController, err error) {
+ var selector labels.Selector
+ var rc api.ReplicationController
+
+ if len(pod.Labels) == 0 {
+ err = fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name)
+ return
+ }
+
+ key := &api.ReplicationController{ObjectMeta: api.ObjectMeta{Namespace: pod.Namespace}}
+ items, err := s.Indexer.Index(NamespaceIndex, key)
+ if err != nil {
+ return
+ }
+
+ for _, m := range items {
+ rc = *m.(*api.ReplicationController)
+ labelSet := labels.Set(rc.Spec.Selector)
+ selector = labels.Set(rc.Spec.Selector).AsSelector()
+
+ // If an rc with a nil or empty selector creeps in, it should match nothing, not everything.
+ if labelSet.AsSelector().Empty() || !selector.Matches(labels.Set(pod.Labels)) {
+ continue
+ }
+ controllers = append(controllers, rc)
+ }
+ if len(controllers) == 0 {
+ err = fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
+ }
+ return
+}
+
+// StoreToDeploymentLister gives a store List and Exists methods. The store must contain only Deployments.
+type StoreToDeploymentLister struct {
+ Store
+}
+
+// Exists checks if the given deployment exists in the store.
+func (s *StoreToDeploymentLister) Exists(deployment *extensions.Deployment) (bool, error) {
+ _, exists, err := s.Store.Get(deployment)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// StoreToDeploymentLister lists all deployments in the store.
+// TODO: converge on the interface in pkg/client
+func (s *StoreToDeploymentLister) List() (deployments []extensions.Deployment, err error) {
+ for _, c := range s.Store.List() {
+ deployments = append(deployments, *(c.(*extensions.Deployment)))
+ }
+ return deployments, nil
+}
+
+// GetDeploymentsForReplicaSet returns a list of deployments managing a replica set. Returns an error only if no matching deployments are found.
+func (s *StoreToDeploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) (deployments []extensions.Deployment, err error) {
+ var d extensions.Deployment
+
+ if len(rs.Labels) == 0 {
+ err = fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name)
+ return
+ }
+
+ // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label
+ for _, m := range s.Store.List() {
+ d = *m.(*extensions.Deployment)
+ if d.Namespace != rs.Namespace {
+ continue
+ }
+
+ selector, err := unversioned.LabelSelectorAsSelector(d.Spec.Selector)
+ if err != nil {
+ return nil, fmt.Errorf("invalid label selector: %v", err)
+ }
+ // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything.
+ if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) {
+ continue
+ }
+ deployments = append(deployments, d)
+ }
+ if len(deployments) == 0 {
+ err = fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels)
+ }
+ return
+}
+
+// StoreToReplicaSetLister gives a store List and Exists methods. The store must contain only ReplicaSets.
+type StoreToReplicaSetLister struct {
+ Store
+}
+
+// Exists checks if the given ReplicaSet exists in the store.
+func (s *StoreToReplicaSetLister) Exists(rs *extensions.ReplicaSet) (bool, error) {
+ _, exists, err := s.Store.Get(rs)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// List lists all ReplicaSets in the store.
+// TODO: converge on the interface in pkg/client
+func (s *StoreToReplicaSetLister) List() (rss []extensions.ReplicaSet, err error) {
+ for _, rs := range s.Store.List() {
+ rss = append(rss, *(rs.(*extensions.ReplicaSet)))
+ }
+ return rss, nil
+}
+
+type storeReplicaSetsNamespacer struct {
+ store Store
+ namespace string
+}
+
+func (s storeReplicaSetsNamespacer) List(selector labels.Selector) (rss []extensions.ReplicaSet, err error) {
+ for _, c := range s.store.List() {
+ rs := *(c.(*extensions.ReplicaSet))
+ if s.namespace == api.NamespaceAll || s.namespace == rs.Namespace {
+ if selector.Matches(labels.Set(rs.Labels)) {
+ rss = append(rss, rs)
+ }
+ }
+ }
+ return
+}
+
+func (s *StoreToReplicaSetLister) ReplicaSets(namespace string) storeReplicaSetsNamespacer {
+ return storeReplicaSetsNamespacer{s.Store, namespace}
+}
+
+// GetPodReplicaSets returns a list of ReplicaSets managing a pod. Returns an error only if no matching ReplicaSets are found.
+func (s *StoreToReplicaSetLister) GetPodReplicaSets(pod *api.Pod) (rss []extensions.ReplicaSet, err error) {
+ var selector labels.Selector
+ var rs extensions.ReplicaSet
+
+ if len(pod.Labels) == 0 {
+ err = fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name)
+ return
+ }
+
+ for _, m := range s.Store.List() {
+ rs = *m.(*extensions.ReplicaSet)
+ if rs.Namespace != pod.Namespace {
+ continue
+ }
+ selector, err = unversioned.LabelSelectorAsSelector(rs.Spec.Selector)
+ if err != nil {
+ err = fmt.Errorf("invalid selector: %v", err)
+ return
+ }
+
+ // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything.
+ if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
+ continue
+ }
+ rss = append(rss, rs)
+ }
+ if len(rss) == 0 {
+ err = fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
+ }
+ return
+}
+
+// StoreToDaemonSetLister gives a store List and Exists methods. The store must contain only DaemonSets.
+type StoreToDaemonSetLister struct {
+ Store
+}
+
+// Exists checks if the given daemon set exists in the store.
+func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) {
+ _, exists, err := s.Store.Get(ds)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// List lists all daemon sets in the store.
+// TODO: converge on the interface in pkg/client
+func (s *StoreToDaemonSetLister) List() (dss extensions.DaemonSetList, err error) {
+ for _, c := range s.Store.List() {
+ dss.Items = append(dss.Items, *(c.(*extensions.DaemonSet)))
+ }
+ return dss, nil
+}
+
+// GetPodDaemonSets returns a list of daemon sets managing a pod.
+// Returns an error if and only if no matching daemon sets are found.
+func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *api.Pod) (daemonSets []extensions.DaemonSet, err error) {
+ var selector labels.Selector
+ var daemonSet extensions.DaemonSet
+
+ if len(pod.Labels) == 0 {
+ err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name)
+ return
+ }
+
+ for _, m := range s.Store.List() {
+ daemonSet = *m.(*extensions.DaemonSet)
+ if daemonSet.Namespace != pod.Namespace {
+ continue
+ }
+ selector, err = unversioned.LabelSelectorAsSelector(daemonSet.Spec.Selector)
+ if err != nil {
+ // this should not happen if the DaemonSet passed validation
+ return nil, err
+ }
+
+ // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
+ if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
+ continue
+ }
+ daemonSets = append(daemonSets, daemonSet)
+ }
+ if len(daemonSets) == 0 {
+ err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
+ }
+ return
+}
+
+// StoreToServiceLister makes a Store that has the List method of the client.ServiceInterface
+// The Store must contain (only) Services.
+type StoreToServiceLister struct {
+ Store
+}
+
+func (s *StoreToServiceLister) List() (services api.ServiceList, err error) {
+ for _, m := range s.Store.List() {
+ services.Items = append(services.Items, *(m.(*api.Service)))
+ }
+ return services, nil
+}
+
+// TODO: Move this back to scheduler as a helper function that takes a Store,
+// rather than a method of StoreToServiceLister.
+func (s *StoreToServiceLister) GetPodServices(pod *api.Pod) (services []api.Service, err error) {
+ var selector labels.Selector
+ var service api.Service
+
+ for _, m := range s.Store.List() {
+ service = *m.(*api.Service)
+ // consider only services that are in the same namespace as the pod
+ if service.Namespace != pod.Namespace {
+ continue
+ }
+ if service.Spec.Selector == nil {
+ // services with nil selectors match nothing, not everything.
+ continue
+ }
+ selector = labels.Set(service.Spec.Selector).AsSelector()
+ if selector.Matches(labels.Set(pod.Labels)) {
+ services = append(services, service)
+ }
+ }
+ if len(services) == 0 {
+ err = fmt.Errorf("could not find service for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
+ }
+
+ return
+}
+
+// StoreToEndpointsLister makes a Store that lists endpoints.
+type StoreToEndpointsLister struct {
+ Store
+}
+
+// List lists all endpoints in the store.
+func (s *StoreToEndpointsLister) List() (services api.EndpointsList, err error) {
+ for _, m := range s.Store.List() {
+ services.Items = append(services.Items, *(m.(*api.Endpoints)))
+ }
+ return services, nil
+}
+
+// GetServiceEndpoints returns the endpoints of a service, matched on service name.
+func (s *StoreToEndpointsLister) GetServiceEndpoints(svc *api.Service) (ep api.Endpoints, err error) {
+ for _, m := range s.Store.List() {
+ ep = *m.(*api.Endpoints)
+ if svc.Name == ep.Name && svc.Namespace == ep.Namespace {
+ return ep, nil
+ }
+ }
+ err = fmt.Errorf("could not find endpoints for service: %v", svc.Name)
+ return
+}
+
+// StoreToJobLister gives a store List and Exists methods. The store must contain only Jobs.
+type StoreToJobLister struct {
+ Store
+}
+
+// Exists checks if the given job exists in the store.
+func (s *StoreToJobLister) Exists(job *batch.Job) (bool, error) {
+ _, exists, err := s.Store.Get(job)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// StoreToJobLister lists all jobs in the store.
+func (s *StoreToJobLister) List() (jobs batch.JobList, err error) {
+ for _, c := range s.Store.List() {
+ jobs.Items = append(jobs.Items, *(c.(*batch.Job)))
+ }
+ return jobs, nil
+}
+
+// GetPodJobs returns a list of jobs managing a pod. Returns an error only if no matching jobs are found.
+func (s *StoreToJobLister) GetPodJobs(pod *api.Pod) (jobs []batch.Job, err error) {
+ var selector labels.Selector
+ var job batch.Job
+
+ if len(pod.Labels) == 0 {
+ err = fmt.Errorf("no jobs found for pod %v because it has no labels", pod.Name)
+ return
+ }
+
+ for _, m := range s.Store.List() {
+ job = *m.(*batch.Job)
+ if job.Namespace != pod.Namespace {
+ continue
+ }
+
+ selector, _ = unversioned.LabelSelectorAsSelector(job.Spec.Selector)
+ if !selector.Matches(labels.Set(pod.Labels)) {
+ continue
+ }
+ jobs = append(jobs, job)
+ }
+ if len(jobs) == 0 {
+ err = fmt.Errorf("could not find jobs for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
+ }
+ return
+}
+
+// Typed wrapper around a store of PersistentVolumes
+type StoreToPVFetcher struct {
+ Store
+}
+
+// GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'.
+func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*api.PersistentVolume, error) {
+ o, exists, err := s.Get(&api.PersistentVolume{ObjectMeta: api.ObjectMeta{Name: id}})
+
+ if err != nil {
+ return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err)
+ }
+
+ if !exists {
+ return nil, fmt.Errorf("PersistentVolume '%v' not found", id)
+ }
+
+ return o.(*api.PersistentVolume), nil
+}
+
+// Typed wrapper around a store of PersistentVolumeClaims
+type StoreToPVCFetcher struct {
+ Store
+}
+
+// GetPersistentVolumeClaimInfo returns cached data for the PersistentVolumeClaim 'id'.
+func (s *StoreToPVCFetcher) GetPersistentVolumeClaimInfo(namespace string, id string) (*api.PersistentVolumeClaim, error) {
+ o, exists, err := s.Get(&api.PersistentVolumeClaim{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: id}})
+ if err != nil {
+ return nil, fmt.Errorf("error retrieving PersistentVolumeClaim '%s/%s' from cache: %v", namespace, id, err)
+ }
+
+ if !exists {
+ return nil, fmt.Errorf("PersistentVolumeClaim '%s/%s' not found", namespace, id)
+ }
+
+ return o.(*api.PersistentVolumeClaim), nil
+}
+
+// StoreToPetSetLister gives a store List and Exists methods. The store must contain only PetSets.
+type StoreToPetSetLister struct {
+ Store
+}
+
+// Exists checks if the given PetSet exists in the store.
+func (s *StoreToPetSetLister) Exists(ps *apps.PetSet) (bool, error) {
+ _, exists, err := s.Store.Get(ps)
+ if err != nil {
+ return false, err
+ }
+ return exists, nil
+}
+
+// List lists all PetSets in the store.
+func (s *StoreToPetSetLister) List() (psList []apps.PetSet, err error) {
+ for _, ps := range s.Store.List() {
+ psList = append(psList, *(ps.(*apps.PetSet)))
+ }
+ return psList, nil
+}
+
+type storePetSetsNamespacer struct {
+ store Store
+ namespace string
+}
+
+func (s *StoreToPetSetLister) PetSets(namespace string) storePetSetsNamespacer {
+ return storePetSetsNamespacer{s.Store, namespace}
+}
+
+// GetPodPetSets returns a list of PetSets managing a pod. Returns an error only if no matching PetSets are found.
+func (s *StoreToPetSetLister) GetPodPetSets(pod *api.Pod) (psList []apps.PetSet, err error) {
+ var selector labels.Selector
+ var ps apps.PetSet
+
+ if len(pod.Labels) == 0 {
+ err = fmt.Errorf("no PetSets found for pod %v because it has no labels", pod.Name)
+ return
+ }
+
+ for _, m := range s.Store.List() {
+ ps = *m.(*apps.PetSet)
+ if ps.Namespace != pod.Namespace {
+ continue
+ }
+ selector, err = unversioned.LabelSelectorAsSelector(ps.Spec.Selector)
+ if err != nil {
+ err = fmt.Errorf("invalid selector: %v", err)
+ return
+ }
+
+ // If a PetSet with a nil or empty selector creeps in, it should match nothing, not everything.
+ if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
+ continue
+ }
+ psList = append(psList, ps)
+ }
+ if len(psList) == 0 {
+ err = fmt.Errorf("could not find PetSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
+ }
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go
new file mode 100644
index 0000000..ff56c0b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go
@@ -0,0 +1,86 @@
+/*
+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/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/fields"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ListFunc knows how to list resources
+type ListFunc func(options api.ListOptions) (runtime.Object, error)
+
+// WatchFunc knows how to watch resources
+type WatchFunc func(options api.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 api.ListOptions) (runtime.Object, error) {
+ return c.Get().
+ Namespace(namespace).
+ Resource(resource).
+ VersionedParams(&options, api.ParameterCodec).
+ FieldsSelectorParam(fieldSelector).
+ Do().
+ Get()
+ }
+ watchFunc := func(options api.ListOptions) (watch.Interface, error) {
+ return c.Get().
+ Prefix("watch").
+ Namespace(namespace).
+ Resource(resource).
+ VersionedParams(&options, api.ParameterCodec).
+ FieldsSelectorParam(fieldSelector).
+ Watch()
+ }
+ return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
+}
+
+func timeoutFromListOptions(options api.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 api.ListOptions) (runtime.Object, error) {
+ return lw.ListFunc(options)
+}
+
+// Watch a set of apiserver resources
+func (lw *ListWatch) Watch(options api.ListOptions) (watch.Interface, error) {
+ return lw.WatchFunc(options)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go
new file mode 100644
index 0000000..e1af63e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go
@@ -0,0 +1,423 @@
+/*
+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"
+ "k8s.io/kubernetes/pkg/api"
+ apierrs "k8s.io/kubernetes/pkg/api/errors"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/runtime"
+ utilruntime "k8s.io/kubernetes/pkg/util/runtime"
+ "k8s.io/kubernetes/pkg/util/wait"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// 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 api.ListOptions) (runtime.Object, error)
+ // Watch should begin a watch at the specified version.
+ Watch(options api.ListOptions) (watch.Interface, error)
+}
+
+// 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
+ // now() returns current time - exposed for testing purposes
+ now func() time.Time
+ // nextResync is approximate time of next resync (0 if not scheduled)
+ nextResync time.Time
+ // 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
+ // If we are within 'forceResyncThreshold' from the next planned resync
+ // and are just before issuing Watch(), resync will be forced now.
+ forceResyncThreshold = 3 * time.Second
+ // We try to set timeouts for Watch() so that we will finish about
+ // than 'timeoutThreshold' from next planned periodic resync.
+ timeoutThreshold = 1 * time.Second
+)
+
+// 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,
+ now: time.Now,
+ }
+ 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{"kubernetes/pkg/client/cache/", "kubernetes/pkg/controller/framework/", "/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 dulpicate values off the front of a package name.
+func trimPackagePrefix(file string) string {
+ if l := strings.LastIndex(file, "k8s.io/kubernetes/pkg/"); l >= 0 {
+ return file[l+len("k8s.io/kubernetes/"):]
+ }
+ 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 {
+ r.nextResync = time.Time{}
+ 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.
+ r.nextResync = r.now().Add(r.resyncPeriod)
+ t := time.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 := api.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)
+ go func() {
+ for {
+ select {
+ case <-resyncCh:
+ case <-stopCh:
+ return
+ }
+ glog.V(4).Infof("%s: next resync planned for %#v, forcing now", r.name, r.nextResync)
+ 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 = api.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 := time.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:
+ r.store.Add(event.Object)
+ case watch.Modified:
+ r.store.Update(event.Object)
+ 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.
+ r.store.Delete(event.Object)
+ default:
+ utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event))
+ }
+ *resourceVersion = newResourceVersion
+ r.setLastSyncResourceVersion(newResourceVersion)
+ eventCount++
+ }
+ }
+
+ watchDuration := time.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/store.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/store.go
new file mode 100644
index 0000000..4cd2479
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/store.go
@@ -0,0 +1,240 @@
+/*
+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/kubernetes/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)
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/thread_safe_store.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/thread_safe_store.go
new file mode 100644
index 0000000..9d88ce3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/thread_safe_store.go
@@ -0,0 +1,288 @@
+/*
+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/kubernetes/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)
+ 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.List() {
+ 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
+}
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/undelta_store.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/cache/undelta_store.go
new file mode 100644
index 0000000..117df46
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/metrics/metrics.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/metrics/metrics.go
new file mode 100644
index 0000000..53029b5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/metrics/metrics.go
@@ -0,0 +1,67 @@
+/*
+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 utilities for registering client metrics to Prometheus.
+package metrics
+
+import (
+ "sync"
+ "time"
+
+ "github.com/prometheus/client_golang/prometheus"
+)
+
+const restClientSubsystem = "rest_client"
+
+var (
+ // RequestLatency is a Prometheus Summary metric type partitioned by
+ // "verb" and "url" labels. It is used for the rest client latency metrics.
+ RequestLatency = prometheus.NewSummaryVec(
+ prometheus.SummaryOpts{
+ Subsystem: restClientSubsystem,
+ Name: "request_latency_microseconds",
+ Help: "Request latency in microseconds. Broken down by verb and URL",
+ MaxAge: time.Hour,
+ },
+ []string{"verb", "url"},
+ )
+
+ RequestResult = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Subsystem: restClientSubsystem,
+ Name: "request_status_codes",
+ Help: "Number of http requests, partitioned by metadata",
+ },
+ []string{"code", "method", "host"},
+ )
+)
+
+var registerMetrics sync.Once
+
+// Register registers all metrics to Prometheus with
+// respect to the RequestLatency.
+func Register() {
+ // Register the metrics.
+ registerMetrics.Do(func() {
+ prometheus.MustRegister(RequestLatency)
+ prometheus.MustRegister(RequestResult)
+ })
+}
+
+// Calculates 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go
new file mode 100644
index 0000000..24ad191
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go
@@ -0,0 +1,224 @@
+/*
+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 restclient
+
+import (
+ "fmt"
+ "net/http"
+ "net/url"
+ "os"
+ "strconv"
+ "strings"
+ "time"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/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"
+)
+
+// 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 undelying 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 = &unversioned.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.
+func createSerializers(config ContentConfig) (*Serializers, error) {
+ negotiated := config.NegotiatedSerializer
+ contentType := config.ContentType
+ info, ok := negotiated.SerializerForMediaType(contentType, nil)
+ if !ok {
+ return nil, fmt.Errorf("serializer for %s not registered", contentType)
+ }
+ streamInfo, ok := negotiated.StreamingSerializerForMediaType(contentType, nil)
+ if !ok {
+ return nil, fmt.Errorf("streaming serializer for %s not registered", contentType)
+ }
+ internalGV := unversioned.GroupVersion{
+ Group: config.GroupVersion.Group,
+ Version: runtime.APIVersionInternal,
+ }
+ return &Serializers{
+ Encoder: negotiated.EncoderForVersion(info.Serializer, *config.GroupVersion),
+ Decoder: negotiated.DecoderToVersion(info.Serializer, internalGV),
+ StreamingSerializer: streamInfo.Serializer,
+ Framer: streamInfo.Framer,
+ RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) {
+ renegotiated, ok := negotiated.SerializerForMediaType(contentType, params)
+ if !ok {
+ return nil, fmt.Errorf("serializer for %s not registered", contentType)
+ }
+ return negotiated.DecoderToVersion(renegotiated.Serializer, internalGV), nil
+ },
+ }, 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 api.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() unversioned.GroupVersion {
+ return *c.contentConfig.GroupVersion
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go
new file mode 100644
index 0000000..fec5f49
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go
@@ -0,0 +1,328 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package restclient
+
+import (
+ "fmt"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "os"
+ "path"
+ gruntime "runtime"
+ "strings"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/crypto"
+ "k8s.io/kubernetes/pkg/util/flowcontrol"
+ "k8s.io/kubernetes/pkg/version"
+)
+
+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 username that this RESTClient will impersonate
+ Impersonate string
+
+ // 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
+
+ // Server should be accessed without verifying the TLS
+ // certificate. For testing only.
+ Insecure bool
+
+ // 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
+}
+
+// TLSClientConfig contains settings to enable transport layer security
+type TLSClientConfig struct {
+ // 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 {
+ // 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 *unversioned.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}
+ }
+
+ 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}
+ }
+
+ versionConfig := config.ContentConfig
+ if versionConfig.GroupVersion == nil {
+ v := unversioned.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
+}
+
+// DefaultKubernetesUserAgent returns the default user agent that clients can use.
+func DefaultKubernetesUserAgent() string {
+ commit := version.Get().GitCommit
+ if len(commit) > 7 {
+ commit = commit[:7]
+ }
+ if len(commit) == 0 {
+ commit = "unknown"
+ }
+ version := version.Get().GitVersion
+ seg := strings.SplitN(version, "-", 2)
+ version = seg[0]
+ return fmt.Sprintf("%s/%s (%s/%s) kubernetes/%s", path.Base(os.Args[0]), version, gruntime.GOOS, gruntime.GOARCH, commit)
+}
+
+// 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 kuberenetes. 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/" + api.ServiceAccountTokenKey)
+ if err != nil {
+ return nil, err
+ }
+ tlsClientConfig := TLSClientConfig{}
+ rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/" + api.ServiceAccountRootCAKey
+ if _, err := crypto.CertPoolFromFile(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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go
new file mode 100644
index 0000000..06ac3cc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/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 restclient
+
+import (
+ "fmt"
+ "net/http"
+ "sync"
+
+ "github.com/golang/glog"
+
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go
new file mode 100644
index 0000000..51fac6b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go
@@ -0,0 +1,1086 @@
+/*
+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 restclient
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "mime"
+ "net/http"
+ "net/url"
+ "path"
+ "reflect"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/api/errors"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/api/validation"
+ "k8s.io/kubernetes/pkg/client/metrics"
+ "k8s.io/kubernetes/pkg/fields"
+ "k8s.io/kubernetes/pkg/labels"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer/streaming"
+ "k8s.io/kubernetes/pkg/util/flowcontrol"
+ "k8s.io/kubernetes/pkg/util/net"
+ "k8s.io/kubernetes/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/watch"
+ "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+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
+)
+
+func init() {
+ metrics.Register()
+}
+
+// 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
+ selector labels.Selector
+ timeout time.Duration
+
+ // output
+ err error
+ body io.Reader
+
+ // The constructed request and the response
+ req *http.Request
+ resp *http.Response
+
+ 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,
+ }
+ if 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 := validation.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 := validation.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 := validation.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 := validation.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[unversioned.GroupVersion]resourceTypeToFieldMapping
+
+func (v versionToResourceToFieldMapping) filterField(groupVersion *unversioned.GroupVersion, resourceType, field, value string) (newField, newValue string, err error) {
+ rMapping, ok := v[*groupVersion]
+ if !ok {
+ glog.Warningf("Field selector: %v - %v - %v - %v: need to check if this is versioned correctly.", groupVersion, resourceType, field, value)
+ return field, value, nil
+ }
+ newField, newValue, err = rMapping.filterField(resourceType, field, value)
+ if err != nil {
+ // This is only a warning until we find and fix all of the client's usages.
+ glog.Warningf("Field selector: %v - %v - %v - %v: need to check if this is versioned correctly.", groupVersion, resourceType, field, value)
+ return field, value, nil
+ }
+ return newField, newValue, nil
+}
+
+var fieldMappings = versionToResourceToFieldMapping{
+ v1.SchemeGroupVersion: resourceTypeToFieldMapping{
+ "nodes": clientFieldNameToAPIVersionFieldName{
+ objectNameField: objectNameField,
+ nodeUnschedulable: nodeUnschedulable,
+ },
+ "pods": clientFieldNameToAPIVersionFieldName{
+ 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(unversioned.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(unversioned.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 == unversioned.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 == unversioned.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
+ }
+ glog.V(8).Infof("Request Body: %s", string(data))
+ r.body = bytes.NewReader(data)
+ case []byte:
+ glog.V(8).Infof("Request Body: %s", string(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
+ }
+ glog.V(8).Infof("Request Body: %s", string(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
+}
+
+// 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() string {
+ 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
+ return r.URL().String()
+}
+
+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
+ }
+ 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(versioned.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
+ }
+
+ // If we have an error (i.e. apiserver down) we report that as a metric label.
+ if err != nil {
+ metrics.RequestResult.WithLabelValues(err.Error(), req.verb, url).Inc()
+ } else {
+ //Metrics for failure codes
+ metrics.RequestResult.WithLabelValues(strconv.Itoa(resp.StatusCode), req.verb, url).Inc()
+ }
+}
+
+// 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
+ }
+ 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()
+
+ // we have a decent shot at taking the object returned, parsing it as a status object and returning a more normal error
+ bodyBytes, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return nil, fmt.Errorf("%v while accessing %v", resp.Status, url)
+ }
+
+ // TODO: Check ContentType.
+ if runtimeObject, err := runtime.Decode(r.serializers.Decoder, bodyBytes); err == nil {
+ statusError := errors.FromObject(runtimeObject)
+
+ if _, ok := statusError.(errors.APIStatus); ok {
+ return nil, statusError
+ }
+ }
+
+ bodyText := string(bodyBytes)
+ return nil, fmt.Errorf("%s while accessing %v: %s", resp.Status, url, bodyText)
+ }
+}
+
+// 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.WithLabelValues(r.verb, r.finalURLTemplate()).Observe(metrics.SinceInMicroseconds(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
+ }
+ req.Header = r.headers
+
+ r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL()))
+ 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 {
+ return err
+ }
+
+ done := func() bool {
+ // ensure the response body is closed before we reconnect, so that we reuse the same
+ // TCP connection
+ defer 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)
+ })
+ 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
+ }
+ }
+ glog.V(8).Infof("Response Body: %s", string(body))
+
+ // Did the server give us a status response?
+ isStatusResponse := false
+ // Because release-1.1 server returns Status with empty APIVersion at paths
+ // to the Extensions resources, we need to use DecodeInto here to provide
+ // default groupVersion, otherwise a status response won't be correctly
+ // decoded.
+ status := &unversioned.Status{}
+ err := runtime.DecodeInto(r.serializers.Decoder, body, status)
+ if err == nil && len(status.Status) > 0 {
+ isStatusResponse = true
+ }
+
+ switch {
+ case resp.StatusCode == http.StatusSwitchingProtocols:
+ // no-op, we've been upgraded
+ case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent:
+ if !isStatusResponse {
+ return Result{err: r.transformUnstructuredResponseError(resp, req, body)}
+ }
+ return Result{err: errors.FromObject(status)}
+ }
+
+ // If the server gave us a status back, look at what it was.
+ success := resp.StatusCode >= http.StatusOK && resp.StatusCode <= http.StatusPartialContent
+ if isStatusResponse && (status.Status != unversioned.StatusSuccess && !success) {
+ // "Failed" requests are clearly just an error and it makes sense to return them as such.
+ return Result{err: errors.FromObject(status)}
+ }
+
+ contentType := resp.Header.Get("Content-Type")
+ var decoder runtime.Decoder
+ if contentType == r.content.ContentType {
+ decoder = r.serializers.Decoder
+ } else {
+ 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 {
+ return Result{
+ body: body,
+ contentType: contentType,
+ statusCode: resp.StatusCode,
+ }
+ }
+ }
+
+ return Result{
+ body: body,
+ contentType: contentType,
+ statusCode: resp.StatusCode,
+ decoder: decoder,
+ }
+}
+
+// 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(resp.Body); err == nil {
+ body = data
+ }
+ }
+ glog.V(8).Infof("Response Body: %s", string(body))
+
+ message := "unknown"
+ if isTextResponse(resp) {
+ message = strings.TrimSpace(string(body))
+ }
+ retryAfter, _ := retryAfterSeconds(resp)
+ return errors.NewGenericServerResponse(
+ resp.StatusCode,
+ req.Method,
+ unversioned.GroupResource{
+ Group: r.content.GroupVersion.Group,
+ Resource: r.resource,
+ },
+ 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.
+func (r Result) Get() (runtime.Object, error) {
+ if r.err != nil {
+ return nil, r.err
+ }
+ if r.decoder == nil {
+ return nil, fmt.Errorf("serializer for %s doesn't exist", r.contentType)
+ }
+ return runtime.Decode(r.decoder, r.body)
+}
+
+// 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.
+func (r Result) Into(obj runtime.Object) error {
+ if r.err != nil {
+ return r.err
+ }
+ if r.decoder == nil {
+ return fmt.Errorf("serializer for %s doesn't exist", r.contentType)
+ }
+ return runtime.DecodeInto(r.decoder, r.body, obj)
+}
+
+// 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.
+// See the Request.Do() comment for what errors you might get.
+func (r Result) Error() error {
+ return r.err
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go
new file mode 100644
index 0000000..c385914
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.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 restclient
+
+import (
+ "crypto/tls"
+ "net/http"
+
+ "k8s.io/kubernetes/pkg/client/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{
+ CAFile: c.CAFile,
+ CAData: c.CAData,
+ CertFile: c.CertFile,
+ CertData: c.CertData,
+ KeyFile: c.KeyFile,
+ KeyData: c.KeyData,
+ Insecure: c.Insecure,
+ },
+ Username: c.Username,
+ Password: c.Password,
+ BearerToken: c.BearerToken,
+ Impersonate: c.Impersonate,
+ }, nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go
new file mode 100644
index 0000000..81f16d6
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.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 restclient
+
+import (
+ "fmt"
+ "net/url"
+ "path"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+// 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 unversioned.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 {
+ return nil, "", err
+ }
+ if 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, unversioned.GroupVersion{}, defaultTLS)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go
new file mode 100644
index 0000000..24a89ed
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/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 restclient
+
+import (
+ "net/url"
+ "time"
+
+ "github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/util/flowcontrol"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go
new file mode 100644
index 0000000..3376434
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/restclient/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 restclient
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "path"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+)
+
+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 unversioned.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 unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/cache.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/cache.go
new file mode 100644
index 0000000..eedfd3d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/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/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/config.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/config.go
new file mode 100644
index 0000000..6e5c68a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/config.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 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 username that this Config will impersonate
+ Impersonate 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
+}
+
+// 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.
+
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go
new file mode 100644
index 0000000..aadf0cb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go
@@ -0,0 +1,337 @@
+/*
+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"
+ "time"
+
+ "github.com/golang/glog"
+)
+
+// 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) > 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 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 = 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 = 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 }
+
+type impersonatingRoundTripper struct {
+ impersonate string
+ delegate http.RoundTripper
+}
+
+// NewImpersonatingRoundTripper will add an Act-As header to a request unless it has already been set.
+func NewImpersonatingRoundTripper(impersonate string, delegate http.RoundTripper) http.RoundTripper {
+ return &impersonatingRoundTripper{impersonate, delegate}
+}
+
+func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ if len(req.Header.Get("Impersonate-User")) != 0 {
+ return rt.delegate.RoundTrip(req)
+ }
+ req = cloneRequest(req)
+ req.Header.Set("Impersonate-User", rt.impersonate)
+ 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 = 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 }
+
+// cloneRequest returns a clone of the provided *http.Request.
+// The clone is a shallow copy of the struct and its Header map.
+func cloneRequest(r *http.Request) *http.Request {
+ // shallow copy of the struct
+ r2 := new(http.Request)
+ *r2 = *r
+ // deep copy of the Header
+ r2.Header = make(http.Header)
+ for k, s := range r.Header {
+ r2.Header[k] = s
+ }
+ return r2
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go
new file mode 100644
index 0000000..9c5b9ef
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go
@@ -0,0 +1,140 @@
+/*
+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,
+ }
+
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go
new file mode 100644
index 0000000..1bd18b9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go
@@ -0,0 +1,317 @@
+/*
+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"
+ "strings"
+
+ "github.com/emicklei/go-restful/swagger"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/errors"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer"
+ utilerrors "k8s.io/kubernetes/pkg/util/errors"
+ "k8s.io/kubernetes/pkg/version"
+)
+
+// DiscoveryInterface holds the methods that discover server-supported API groups,
+// versions and resources.
+type DiscoveryInterface interface {
+ ServerGroupsInterface
+ ServerResourcesInterface
+ ServerVersionInterface
+ SwaggerSchemaInterface
+}
+
+// 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() (*unversioned.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) (*unversioned.APIResourceList, error)
+ // ServerResources returns the supported resources for all groups and versions.
+ ServerResources() (map[string]*unversioned.APIResourceList, error)
+ // ServerPreferredResources returns the supported resources with the version preferred by the
+ // server.
+ ServerPreferredResources() ([]unversioned.GroupVersionResource, error)
+ // ServerPreferredNamespacedResources returns the supported namespaced resources with the
+ // version preferred by the server.
+ ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, 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 unversioned.GroupVersion) (*swagger.ApiDeclaration, error)
+}
+
+// DiscoveryClient implements the functions that discover server-supported API groups,
+// versions and resources.
+type DiscoveryClient struct {
+ *restclient.RESTClient
+
+ LegacyPrefix string
+}
+
+// Convert unversioned.APIVersions to unversioned.APIGroup. APIVersions is used by legacy v1, so
+// group would be "".
+func apiVersionsToAPIGroup(apiVersions *unversioned.APIVersions) (apiGroup unversioned.APIGroup) {
+ groupVersions := []unversioned.GroupVersionForDiscovery{}
+ for _, version := range apiVersions.Versions {
+ groupVersion := unversioned.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 *unversioned.APIGroupList, err error) {
+ // Get the groupVersions exposed at /api
+ v := &unversioned.APIVersions{}
+ err = d.Get().AbsPath(d.LegacyPrefix).Do().Into(v)
+ apiGroup := unversioned.APIGroup{}
+ if err == nil {
+ apiGroup = apiVersionsToAPIGroup(v)
+ }
+ if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
+ return nil, err
+ }
+
+ // Get the groupVersions exposed at /apis
+ apiGroupList = &unversioned.APIGroupList{}
+ err = d.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 = &unversioned.APIGroupList{}
+ }
+
+ // append the group retrieved from /api to the list
+ 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 *unversioned.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 = &unversioned.APIResourceList{}
+ err = d.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
+ } else {
+ return nil, err
+ }
+ }
+ return resources, nil
+}
+
+// ServerResources returns the supported resources for all groups and versions.
+func (d *DiscoveryClient) ServerResources() (map[string]*unversioned.APIResourceList, error) {
+ apiGroups, err := d.ServerGroups()
+ if err != nil {
+ return nil, err
+ }
+ groupVersions := unversioned.ExtractGroupVersions(apiGroups)
+ result := map[string]*unversioned.APIResourceList{}
+ for _, groupVersion := range groupVersions {
+ resources, err := d.ServerResourcesForGroupVersion(groupVersion)
+ if err != nil {
+ return nil, err
+ }
+ result[groupVersion] = resources
+ }
+ return result, nil
+}
+
+// serverPreferredResources returns the supported resources with the version preferred by the
+// server. If namespaced is true, only namespaced resources will be returned.
+func (d *DiscoveryClient) serverPreferredResources(namespaced bool) ([]unversioned.GroupVersionResource, error) {
+ results := []unversioned.GroupVersionResource{}
+ serverGroupList, err := d.ServerGroups()
+ if err != nil {
+ return results, err
+ }
+
+ allErrs := []error{}
+ for _, apiGroup := range serverGroupList.Groups {
+ preferredVersion := apiGroup.PreferredVersion
+ apiResourceList, err := d.ServerResourcesForGroupVersion(preferredVersion.GroupVersion)
+ if err != nil {
+ allErrs = append(allErrs, err)
+ continue
+ }
+ groupVersion := unversioned.GroupVersion{Group: apiGroup.Name, Version: preferredVersion.Version}
+ for _, apiResource := range apiResourceList.APIResources {
+ // ignore the root scoped resources if "namespaced" is true.
+ if namespaced && !apiResource.Namespaced {
+ continue
+ }
+ if strings.Contains(apiResource.Name, "/") {
+ continue
+ }
+ results = append(results, groupVersion.WithResource(apiResource.Name))
+ }
+ }
+ return results, utilerrors.NewAggregate(allErrs)
+}
+
+// ServerPreferredResources returns the supported resources with the version preferred by the
+// server.
+func (d *DiscoveryClient) ServerPreferredResources() ([]unversioned.GroupVersionResource, error) {
+ return d.serverPreferredResources(false)
+}
+
+// ServerPreferredNamespacedResources returns the supported namespaced resources with the
+// version preferred by the server.
+func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error) {
+ return d.serverPreferredResources(true)
+}
+
+// ServerVersion retrieves and parses the server's version (git version).
+func (d *DiscoveryClient) ServerVersion() (*version.Info, error) {
+ body, err := d.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.
+func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
+ if version.IsEmpty() {
+ return nil, fmt.Errorf("groupVersion cannot be empty")
+ }
+
+ groupList, err := d.ServerGroups()
+ if err != nil {
+ return nil, err
+ }
+ groupVersions := unversioned.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.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
+}
+
+func setDiscoveryDefaults(config *restclient.Config) error {
+ config.APIPath = ""
+ config.GroupVersion = nil
+ codec := runtime.NoopEncoder{Decoder: api.Codecs.UniversalDecoder()}
+ config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(
+ runtime.SerializerInfo{Serializer: codec},
+ runtime.StreamSerializerInfo{},
+ )
+ 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.RESTClient) *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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/apps.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/apps.go
new file mode 100644
index 0000000..f2498cb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/apps.go
@@ -0,0 +1,76 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+type AppsInterface interface {
+ PetSetNamespacer
+}
+
+// AppsClient is used to interact with Kubernetes batch features.
+type AppsClient struct {
+ *restclient.RESTClient
+}
+
+func (c *AppsClient) PetSets(namespace string) PetSetInterface {
+ return newPetSet(c, namespace)
+}
+
+func NewApps(c *restclient.Config) (*AppsClient, error) {
+ config := *c
+ if err := setAppsDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AppsClient{client}, nil
+}
+
+func NewAppsOrDie(c *restclient.Config) *AppsClient {
+ client, err := NewApps(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setAppsDefaults(config *restclient.Config) error {
+ g, err := registered.Group(apps.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go
new file mode 100644
index 0000000..128597f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go
@@ -0,0 +1,125 @@
+/*
+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 auth defines a file format for holding authentication
+information needed by clients of Kubernetes. Typically,
+a Kubernetes cluster will put auth info for the admin in a known
+location when it is created, and will (soon) put it in a known
+location within a Container's file tree for Containers that
+need access to the Kubernetes API.
+
+Having a defined format allows:
+ - clients to be implmented in multiple languages
+ - applications which link clients to be portable across
+ clusters with different authentication styles (e.g.
+ some may use SSL Client certs, others may not, etc)
+ - when the format changes, applications only
+ need to update this code.
+
+The file format is json, marshalled from a struct authcfg.Info.
+
+Clinet libraries in other languages should use the same format.
+
+It is not intended to store general preferences, such as default
+namespace, output options, etc. CLIs (such as kubectl) and UIs should
+develop their own format and may wish to inline the authcfg.Info type.
+
+The authcfg.Info is just a file format. It is distinct from
+client.Config which holds options for creating a client.Client.
+Helper functions are provided in this package to fill in a
+client.Client from an authcfg.Info.
+
+Example:
+
+ import (
+ "pkg/client"
+ "pkg/client/auth"
+ )
+
+ info, err := auth.LoadFromFile(filename)
+ if err != nil {
+ // handle error
+ }
+ clientConfig = client.Config{}
+ clientConfig.Host = "example.com:4901"
+ clientConfig = info.MergeWithConfig()
+ client := client.New(clientConfig)
+ client.Pods(ns).List()
+*/
+package auth
+
+// TODO: need a way to rotate Tokens. Therefore, need a way for client object to be reset when the authcfg is updated.
+import (
+ "encoding/json"
+ "io/ioutil"
+ "os"
+
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+// Info holds Kubernetes API authorization config. It is intended
+// to be read/written from a file as a JSON object.
+type Info struct {
+ User string
+ Password string
+ CAFile string
+ CertFile string
+ KeyFile string
+ BearerToken string
+ Insecure *bool
+}
+
+// LoadFromFile parses an Info object from a file path.
+// If the file does not exist, then os.IsNotExist(err) == true
+func LoadFromFile(path string) (*Info, error) {
+ var info Info
+ if _, err := os.Stat(path); os.IsNotExist(err) {
+ return nil, err
+ }
+ data, err := ioutil.ReadFile(path)
+ if err != nil {
+ return nil, err
+ }
+ err = json.Unmarshal(data, &info)
+ if err != nil {
+ return nil, err
+ }
+ return &info, err
+}
+
+// MergeWithConfig returns a copy of a client.Config with values from the Info.
+// The fields of client.Config with a corresponding field in the Info are set
+// with the value from the Info.
+func (info Info) MergeWithConfig(c restclient.Config) (restclient.Config, error) {
+ var config restclient.Config = c
+ config.Username = info.User
+ config.Password = info.Password
+ config.CAFile = info.CAFile
+ config.CertFile = info.CertFile
+ config.KeyFile = info.KeyFile
+ config.BearerToken = info.BearerToken
+ if info.Insecure != nil {
+ config.Insecure = *info.Insecure
+ }
+ return config, nil
+}
+
+func (info Info) Complete() bool {
+ return len(info.User) > 0 ||
+ len(info.CertFile) > 0 ||
+ len(info.BearerToken) > 0
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/autoscaling.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/autoscaling.go
new file mode 100644
index 0000000..188a5ea
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/autoscaling.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+type AutoscalingInterface interface {
+ HorizontalPodAutoscalersNamespacer
+}
+
+// AutoscalingClient is used to interact with Kubernetes autoscaling features.
+type AutoscalingClient struct {
+ *restclient.RESTClient
+}
+
+func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
+ return newHorizontalPodAutoscalers(c, namespace)
+}
+
+func NewAutoscaling(c *restclient.Config) (*AutoscalingClient, error) {
+ config := *c
+ if err := setAutoscalingDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AutoscalingClient{client}, nil
+}
+
+func NewAutoscalingOrDie(c *restclient.Config) *AutoscalingClient {
+ client, err := NewAutoscaling(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setAutoscalingDefaults(config *restclient.Config) error {
+ // if autoscaling group is not registered, return an error
+ g, err := registered.Group(autoscaling.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/batch.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/batch.go
new file mode 100644
index 0000000..c31652f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/batch.go
@@ -0,0 +1,107 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+type BatchInterface interface {
+ JobsNamespacer
+ ScheduledJobsNamespacer
+}
+
+// BatchClient is used to interact with Kubernetes batch features.
+type BatchClient struct {
+ *restclient.RESTClient
+}
+
+func (c *BatchClient) Jobs(namespace string) JobInterface {
+ return newJobsV1(c, namespace)
+}
+
+func (c *BatchClient) ScheduledJobs(namespace string) ScheduledJobInterface {
+ return newScheduledJobs(c, namespace)
+}
+
+func NewBatch(c *restclient.Config) (*BatchClient, error) {
+ config := *c
+ if err := setBatchDefaults(&config, nil); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchClient{client}, nil
+}
+
+func NewBatchV2Alpha1(c *restclient.Config) (*BatchClient, error) {
+ config := *c
+ if err := setBatchDefaults(&config, &v2alpha1.SchemeGroupVersion); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchClient{client}, nil
+}
+
+func NewBatchOrDie(c *restclient.Config) *BatchClient {
+ var (
+ client *BatchClient
+ err error
+ )
+ if c.ContentConfig.GroupVersion != nil && *c.ContentConfig.GroupVersion == v2alpha1.SchemeGroupVersion {
+ client, err = NewBatchV2Alpha1(c)
+ } else {
+ client, err = NewBatch(c)
+ }
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setBatchDefaults(config *restclient.Config, gv *unversioned.GroupVersion) error {
+ // if batch group is not registered, return an error
+ g, err := registered.Group(batch.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ if gv != nil {
+ copyGroupVersion = *gv
+ }
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificates.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificates.go
new file mode 100644
index 0000000..29b15c4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificates.go
@@ -0,0 +1,86 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/certificates"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+// Interface holds the methods for clients of Kubernetes to allow mock testing.
+type CertificatesInterface interface {
+ CertificateSigningRequests() CertificateSigningRequestInterface
+}
+
+type CertificatesClient struct {
+ *restclient.RESTClient
+}
+
+func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface {
+ return newCertificateSigningRequests(c)
+}
+
+// NewCertificates creates a new CertificatesClient for the given config.
+func NewCertificates(c *restclient.Config) (*CertificatesClient, error) {
+ config := *c
+ if err := setCertificatesDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &CertificatesClient{client}, nil
+}
+
+// NewCertificatesOrDie creates a new CertificatesClient for the given config and
+// panics if there is an error in the config.
+func NewCertificatesOrDie(c *restclient.Config) *CertificatesClient {
+ client, err := NewCertificates(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setCertificatesDefaults(config *restclient.Config) error {
+ // if certificates group is not registered, return an error
+ g, err := registered.Group(certificates.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ if config.QPS == 0 {
+ config.QPS = 5
+ }
+ if config.Burst == 0 {
+ config.Burst = 10
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificatesigningrequests.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificatesigningrequests.go
new file mode 100644
index 0000000..f3ce09f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/certificatesigningrequests.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/certificates"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
+type CertificateSigningRequestInterface interface {
+ List(opts api.ListOptions) (*certificates.CertificateSigningRequestList, error)
+ Get(name string) (*certificates.CertificateSigningRequest, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error)
+ Update(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error)
+ UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error)
+ UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// certificateSigningRequests implements CertificateSigningRequestsNamespacer interface
+type certificateSigningRequests struct {
+ client *CertificatesClient
+}
+
+// newCertificateSigningRequests returns a certificateSigningRequests
+func newCertificateSigningRequests(c *CertificatesClient) *certificateSigningRequests {
+ return &certificateSigningRequests{
+ client: c,
+ }
+}
+
+// List takes label and field selectors, and returns the list of certificateSigningRequests that match those selectors.
+func (c *certificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) {
+ result = &certificates.CertificateSigningRequestList{}
+ err = c.client.Get().Resource("certificatesigningrequests").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the certificateSigningRequest, and returns the corresponding CertificateSigningRequest object, and an error if it occurs
+func (c *certificateSigningRequests) Get(name string) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.CertificateSigningRequest{}
+ err = c.client.Get().Resource("certificatesigningrequests").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
+func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOptions) error {
+ return c.client.Delete().Resource("certificatesigningrequests").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs.
+func (c *certificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.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 it occurs.
+func (c *certificateSigningRequests) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.CertificateSigningRequest{}
+ err = c.client.Put().Resource("certificatesigningrequests").Name(certificateSigningRequest.Name).Body(certificateSigningRequest).Do().Into(result)
+ return
+}
+
+// UpdateStatus takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs.
+func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.CertificateSigningRequest{}
+ err = c.client.Put().Resource("certificatesigningrequests").Name(certificateSigningRequest.Name).SubResource("status").Body(certificateSigningRequest).Do().Into(result)
+ return
+}
+
+// UpdateApproval takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs.
+func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.CertificateSigningRequest{}
+ err = c.client.Put().Resource("certificatesigningrequests").Name(certificateSigningRequest.Name).SubResource("approval").Body(certificateSigningRequest).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
+func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(api.NamespaceAll).
+ Resource("certificatesigningrequests").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/client.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/client.go
new file mode 100644
index 0000000..5474e96
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/client.go
@@ -0,0 +1,179 @@
+/*
+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 unversioned
+
+import (
+ "net"
+ "net/url"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/client/typed/discovery"
+)
+
+// Interface holds the methods for clients of Kubernetes,
+// an interface to allow mock testing.
+type Interface interface {
+ PodsNamespacer
+ PodTemplatesNamespacer
+ ReplicationControllersNamespacer
+ ServicesNamespacer
+ EndpointsNamespacer
+ NodesInterface
+ EventNamespacer
+ LimitRangesNamespacer
+ ResourceQuotasNamespacer
+ ServiceAccountsNamespacer
+ SecretsNamespacer
+ NamespacesInterface
+ PersistentVolumesInterface
+ PersistentVolumeClaimsNamespacer
+ ComponentStatusesInterface
+ ConfigMapsNamespacer
+ Autoscaling() AutoscalingInterface
+ Batch() BatchInterface
+ Extensions() ExtensionsInterface
+ Rbac() RbacInterface
+ Discovery() discovery.DiscoveryInterface
+ Certificates() CertificatesInterface
+}
+
+func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
+ return newReplicationControllers(c, namespace)
+}
+
+func (c *Client) Nodes() NodeInterface {
+ return newNodes(c)
+}
+
+func (c *Client) Events(namespace string) EventInterface {
+ return newEvents(c, namespace)
+}
+
+func (c *Client) Endpoints(namespace string) EndpointsInterface {
+ return newEndpoints(c, namespace)
+}
+
+func (c *Client) Pods(namespace string) PodInterface {
+ return newPods(c, namespace)
+}
+
+func (c *Client) PodTemplates(namespace string) PodTemplateInterface {
+ return newPodTemplates(c, namespace)
+}
+
+func (c *Client) Services(namespace string) ServiceInterface {
+ return newServices(c, namespace)
+}
+func (c *Client) LimitRanges(namespace string) LimitRangeInterface {
+ return newLimitRanges(c, namespace)
+}
+
+func (c *Client) ResourceQuotas(namespace string) ResourceQuotaInterface {
+ return newResourceQuotas(c, namespace)
+}
+
+func (c *Client) ServiceAccounts(namespace string) ServiceAccountsInterface {
+ return newServiceAccounts(c, namespace)
+}
+
+func (c *Client) Secrets(namespace string) SecretsInterface {
+ return newSecrets(c, namespace)
+}
+
+func (c *Client) Namespaces() NamespaceInterface {
+ return newNamespaces(c)
+}
+
+func (c *Client) PersistentVolumes() PersistentVolumeInterface {
+ return newPersistentVolumes(c)
+}
+
+func (c *Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
+ return newPersistentVolumeClaims(c, namespace)
+}
+
+func (c *Client) ComponentStatuses() ComponentStatusInterface {
+ return newComponentStatuses(c)
+}
+
+func (c *Client) ConfigMaps(namespace string) ConfigMapsInterface {
+ return newConfigMaps(c, namespace)
+}
+
+// Client is the implementation of a Kubernetes client.
+type Client struct {
+ *restclient.RESTClient
+ *AutoscalingClient
+ *BatchClient
+ *ExtensionsClient
+ *AppsClient
+ *PolicyClient
+ *RbacClient
+ *discovery.DiscoveryClient
+ *CertificatesClient
+}
+
+// IsTimeout tests if this is a timeout error in the underlying transport.
+// This is unbelievably ugly.
+// See: http://stackoverflow.com/questions/23494950/specifically-check-for-timeout-error for details
+func IsTimeout(err error) bool {
+ if err == nil {
+ return false
+ }
+ switch err := err.(type) {
+ case *url.Error:
+ if err, ok := err.Err.(net.Error); ok {
+ return err.Timeout()
+ }
+ case net.Error:
+ return err.Timeout()
+ }
+
+ if strings.Contains(err.Error(), "use of closed network connection") {
+ return true
+ }
+ return false
+}
+
+func (c *Client) Autoscaling() AutoscalingInterface {
+ return c.AutoscalingClient
+}
+
+func (c *Client) Batch() BatchInterface {
+ return c.BatchClient
+}
+
+func (c *Client) Extensions() ExtensionsInterface {
+ return c.ExtensionsClient
+}
+
+func (c *Client) Apps() AppsInterface {
+ return c.AppsClient
+}
+
+func (c *Client) Rbac() RbacInterface {
+ return c.RbacClient
+}
+
+func (c *Client) Discovery() discovery.DiscoveryInterface {
+ return c.DiscoveryClient
+}
+
+func (c *Client) Certificates() CertificatesInterface {
+ return c.CertificatesClient
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers.go
new file mode 100644
index 0000000..43e2648
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.go
new file mode 100644
index 0000000..0b9a427
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.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 latest
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+ _ "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer/json"
+ "k8s.io/kubernetes/pkg/runtime/serializer/versioning"
+)
+
+// Version is the string that represents the current external default version.
+const Version = "v1"
+
+var ExternalVersion = unversioned.GroupVersion{Group: "", Version: "v1"}
+
+// OldestVersion is the string that represents the oldest server version supported,
+// for client code that wants to hardcode the lowest common denominator.
+const OldestVersion = "v1"
+
+// Versions is the list of versions that are recognized in code. The order provided
+// may be assumed to be least feature rich to most feature rich, and clients may
+// choose to prefer the latter items in the list over the former items when presented
+// with a set of versions to choose.
+var Versions = []string{"v1"}
+
+var Codec runtime.Codec
+
+func init() {
+ yamlSerializer := json.NewYAMLSerializer(json.DefaultMetaFactory, api.Scheme, api.Scheme)
+ Codec = versioning.NewCodecForScheme(
+ api.Scheme,
+ yamlSerializer,
+ yamlSerializer,
+ []unversioned.GroupVersion{{Version: Version}},
+ []unversioned.GroupVersion{{Version: runtime.APIVersionInternal}},
+ )
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go
new file mode 100644
index 0000000..5426e7f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go
@@ -0,0 +1,43 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
+var Scheme = runtime.NewScheme()
+
+// SchemeGroupVersion is group version used to register these objects
+// TODO this should be in the "kubeconfig" group
+var SchemeGroupVersion = unversioned.GroupVersion{Group: "", Version: runtime.APIVersionInternal}
+
+func init() {
+ Scheme.AddKnownTypes(SchemeGroupVersion,
+ &Config{},
+ )
+}
+
+func (obj *Config) GetObjectKind() unversioned.ObjectKind { return obj }
+func (obj *Config) SetGroupVersionKind(gvk unversioned.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+func (obj *Config) GroupVersionKind() unversioned.GroupVersionKind {
+ return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go
new file mode 100644
index 0000000..95b5289
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go
@@ -0,0 +1,152 @@
+/*
+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/kubernetes/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.
+ Kind string `json:"kind,omitempty"`
+ // DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
+ // Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify
+ // a single value for the cluster version.
+ // This field isn't really needed anyway, so we are deprecating it without replacement.
+ // It will be ignored if it is present.
+ 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
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// IMPORTANT if you add fields to this struct, please update IsConfigEmpty()
+type Preferences struct {
+ Colors bool `json:"colors,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ 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"`
+ // APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
+ APIVersion string `json:"api-version,omitempty"`
+ // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
+ InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
+ // CertificateAuthority is the path to a cert file for the certificate authority.
+ CertificateAuthority string `json:"certificate-authority,omitempty"`
+ // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
+ 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
+ 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.
+ ClientCertificate string `json:"client-certificate,omitempty"`
+ // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
+ ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
+ // ClientKey is the path to a client key file for TLS.
+ ClientKey string `json:"client-key,omitempty"`
+ // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
+ ClientKeyData []byte `json:"client-key-data,omitempty"`
+ // Token is the bearer token for authentication to the kubernetes cluster.
+ Token string `json:"token,omitempty"`
+ // Impersonate is the username to act-as.
+ Impersonate string `json:"act-as,omitempty"`
+ // Username is the username for basic authentication to the kubernetes cluster.
+ Username string `json:"username,omitempty"`
+ // Password is the password for basic authentication to the kubernetes cluster.
+ Password string `json:"password,omitempty"`
+ // AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
+ 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
+ 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
+ Namespace string `json:"namespace,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// AuthProviderConfig holds the configuration for a specified auth provider.
+type AuthProviderConfig struct {
+ Name string `json:"name"`
+ 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),
+ }
+}
+
+// NewConfig is a convenience function that returns a new Config object with non-nil maps
+func NewContext() *Context {
+ return &Context{Extensions: make(map[string]runtime.Object)}
+}
+
+// NewConfig is a convenience function that returns a new Config object with non-nil maps
+func NewCluster() *Cluster {
+ return &Cluster{Extensions: make(map[string]runtime.Object)}
+}
+
+// NewConfig is a convenience function that returns a new Config object with non-nil maps
+func NewAuthInfo() *AuthInfo {
+ return &AuthInfo{Extensions: make(map[string]runtime.Object)}
+}
+
+// NewConfig is a convenience function that returns a new Config object with non-nil maps
+func NewPreferences() *Preferences {
+ return &Preferences{Extensions: make(map[string]runtime.Object)}
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go
new file mode 100644
index 0000000..e22e5f8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go
@@ -0,0 +1,231 @@
+/*
+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 (
+ "sort"
+
+ "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+func init() {
+ err := api.Scheme.AddConversionFuncs(
+ func(in *Cluster, out *api.Cluster, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *api.Cluster, out *Cluster, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *Preferences, out *api.Preferences, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *api.Preferences, out *Preferences, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *AuthInfo, out *api.AuthInfo, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *api.AuthInfo, out *AuthInfo, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *Context, out *api.Context, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+ func(in *api.Context, out *Context, s conversion.Scope) error {
+ return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
+ },
+
+ func(in *Config, out *api.Config, s conversion.Scope) error {
+ out.CurrentContext = in.CurrentContext
+ if err := s.Convert(&in.Preferences, &out.Preferences, 0); err != nil {
+ return err
+ }
+
+ out.Clusters = make(map[string]*api.Cluster)
+ if err := s.Convert(&in.Clusters, &out.Clusters, 0); err != nil {
+ return err
+ }
+ out.AuthInfos = make(map[string]*api.AuthInfo)
+ if err := s.Convert(&in.AuthInfos, &out.AuthInfos, 0); err != nil {
+ return err
+ }
+ out.Contexts = make(map[string]*api.Context)
+ if err := s.Convert(&in.Contexts, &out.Contexts, 0); err != nil {
+ return err
+ }
+ out.Extensions = make(map[string]runtime.Object)
+ if err := s.Convert(&in.Extensions, &out.Extensions, 0); err != nil {
+ return err
+ }
+ return nil
+ },
+ func(in *api.Config, out *Config, s conversion.Scope) error {
+ out.CurrentContext = in.CurrentContext
+ if err := s.Convert(&in.Preferences, &out.Preferences, 0); err != nil {
+ return err
+ }
+
+ out.Clusters = make([]NamedCluster, 0, 0)
+ if err := s.Convert(&in.Clusters, &out.Clusters, 0); err != nil {
+ return err
+ }
+ out.AuthInfos = make([]NamedAuthInfo, 0, 0)
+ if err := s.Convert(&in.AuthInfos, &out.AuthInfos, 0); err != nil {
+ return err
+ }
+ out.Contexts = make([]NamedContext, 0, 0)
+ if err := s.Convert(&in.Contexts, &out.Contexts, 0); err != nil {
+ return err
+ }
+ out.Extensions = make([]NamedExtension, 0, 0)
+ if err := s.Convert(&in.Extensions, &out.Extensions, 0); err != nil {
+ return err
+ }
+ return nil
+ },
+ func(in *[]NamedCluster, out *map[string]*api.Cluster, s conversion.Scope) error {
+ for _, curr := range *in {
+ newCluster := api.NewCluster()
+ if err := s.Convert(&curr.Cluster, newCluster, 0); err != nil {
+ return err
+ }
+ (*out)[curr.Name] = newCluster
+ }
+
+ return nil
+ },
+ func(in *map[string]*api.Cluster, out *[]NamedCluster, s conversion.Scope) error {
+ allKeys := make([]string, 0, len(*in))
+ for key := range *in {
+ allKeys = append(allKeys, key)
+ }
+ sort.Strings(allKeys)
+
+ for _, key := range allKeys {
+ newCluster := (*in)[key]
+ oldCluster := &Cluster{}
+ if err := s.Convert(newCluster, oldCluster, 0); err != nil {
+ return err
+ }
+
+ namedCluster := NamedCluster{key, *oldCluster}
+ *out = append(*out, namedCluster)
+ }
+
+ return nil
+ },
+ func(in *[]NamedAuthInfo, out *map[string]*api.AuthInfo, s conversion.Scope) error {
+ for _, curr := range *in {
+ newAuthInfo := api.NewAuthInfo()
+ if err := s.Convert(&curr.AuthInfo, newAuthInfo, 0); err != nil {
+ return err
+ }
+ (*out)[curr.Name] = newAuthInfo
+ }
+
+ return nil
+ },
+ func(in *map[string]*api.AuthInfo, out *[]NamedAuthInfo, s conversion.Scope) error {
+ allKeys := make([]string, 0, len(*in))
+ for key := range *in {
+ allKeys = append(allKeys, key)
+ }
+ sort.Strings(allKeys)
+
+ for _, key := range allKeys {
+ newAuthInfo := (*in)[key]
+ oldAuthInfo := &AuthInfo{}
+ if err := s.Convert(newAuthInfo, oldAuthInfo, 0); err != nil {
+ return err
+ }
+
+ namedAuthInfo := NamedAuthInfo{key, *oldAuthInfo}
+ *out = append(*out, namedAuthInfo)
+ }
+
+ return nil
+ },
+ func(in *[]NamedContext, out *map[string]*api.Context, s conversion.Scope) error {
+ for _, curr := range *in {
+ newContext := api.NewContext()
+ if err := s.Convert(&curr.Context, newContext, 0); err != nil {
+ return err
+ }
+ (*out)[curr.Name] = newContext
+ }
+
+ return nil
+ },
+ func(in *map[string]*api.Context, out *[]NamedContext, s conversion.Scope) error {
+ allKeys := make([]string, 0, len(*in))
+ for key := range *in {
+ allKeys = append(allKeys, key)
+ }
+ sort.Strings(allKeys)
+
+ for _, key := range allKeys {
+ newContext := (*in)[key]
+ oldContext := &Context{}
+ if err := s.Convert(newContext, oldContext, 0); err != nil {
+ return err
+ }
+
+ namedContext := NamedContext{key, *oldContext}
+ *out = append(*out, namedContext)
+ }
+
+ return nil
+ },
+ func(in *[]NamedExtension, out *map[string]runtime.Object, s conversion.Scope) error {
+ for _, curr := range *in {
+ var newExtension runtime.Object
+ if err := s.Convert(&curr.Extension, &newExtension, 0); err != nil {
+ return err
+ }
+ (*out)[curr.Name] = newExtension
+ }
+
+ return nil
+ },
+ func(in *map[string]runtime.Object, out *[]NamedExtension, s conversion.Scope) error {
+ allKeys := make([]string, 0, len(*in))
+ for key := range *in {
+ allKeys = append(allKeys, key)
+ }
+ sort.Strings(allKeys)
+
+ for _, key := range allKeys {
+ newExtension := (*in)[key]
+ oldExtension := &runtime.RawExtension{}
+ if err := s.Convert(newExtension, oldExtension, 0); err != nil {
+ return err
+ }
+
+ namedExtension := NamedExtension{key, *oldExtension}
+ *out = append(*out, namedExtension)
+ }
+
+ return nil
+ },
+ )
+ if err != nil {
+ // If one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go
new file mode 100644
index 0000000..dcdb533
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go
@@ -0,0 +1,40 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+)
+
+// SchemeGroupVersion is group version used to register these objects
+// TODO this should be in the "kubeconfig" group
+var SchemeGroupVersion = unversioned.GroupVersion{Group: "", Version: "v1"}
+
+func init() {
+ api.Scheme.AddKnownTypes(SchemeGroupVersion,
+ &Config{},
+ )
+}
+
+func (obj *Config) GetObjectKind() unversioned.ObjectKind { return obj }
+func (obj *Config) SetGroupVersionKind(gvk unversioned.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+func (obj *Config) GroupVersionKind() unversioned.GroupVersionKind {
+ return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.go
new file mode 100644
index 0000000..77bce80
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.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 v1
+
+import (
+ "k8s.io/kubernetes/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
+type Config struct {
+ // Legacy field from pkg/api/types.go TypeMeta.
+ // TODO(jlowdermilk): remove this after eliminating downstream dependencies.
+ Kind string `json:"kind,omitempty"`
+ // DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
+ // Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify
+ // a single value for the cluster version.
+ // This field isn't really needed anyway, so we are deprecating it without replacement.
+ // It will be ignored if it is present.
+ 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 []NamedCluster `json:"clusters"`
+ // AuthInfos is a map of referencable names to user configs
+ AuthInfos []NamedAuthInfo `json:"users"`
+ // Contexts is a map of referencable names to context configs
+ Contexts []NamedContext `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
+ Extensions []NamedExtension `json:"extensions,omitempty"`
+}
+
+type Preferences struct {
+ Colors bool `json:"colors,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ Extensions []NamedExtension `json:"extensions,omitempty"`
+}
+
+// Cluster contains information about how to communicate with a kubernetes cluster
+type Cluster struct {
+ // Server is the address of the kubernetes cluster (https://hostname:port).
+ Server string `json:"server"`
+ // APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
+ APIVersion string `json:"api-version,omitempty"`
+ // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
+ InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
+ // CertificateAuthority is the path to a cert file for the certificate authority.
+ CertificateAuthority string `json:"certificate-authority,omitempty"`
+ // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
+ 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
+ Extensions []NamedExtension `json:"extensions,omitempty"`
+}
+
+// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
+type AuthInfo struct {
+ // ClientCertificate is the path to a client cert file for TLS.
+ ClientCertificate string `json:"client-certificate,omitempty"`
+ // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
+ ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
+ // ClientKey is the path to a client key file for TLS.
+ ClientKey string `json:"client-key,omitempty"`
+ // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
+ ClientKeyData []byte `json:"client-key-data,omitempty"`
+ // Token is the bearer token for authentication to the kubernetes cluster.
+ Token string `json:"token,omitempty"`
+ // Impersonate is the username to imperonate. The name matches the flag.
+ Impersonate string `json:"as,omitempty"`
+ // Username is the username for basic authentication to the kubernetes cluster.
+ Username string `json:"username,omitempty"`
+ // Password is the password for basic authentication to the kubernetes cluster.
+ Password string `json:"password,omitempty"`
+ // AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
+ 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
+ Extensions []NamedExtension `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 {
+ // 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
+ Namespace string `json:"namespace,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ Extensions []NamedExtension `json:"extensions,omitempty"`
+}
+
+// NamedCluster relates nicknames to cluster information
+type NamedCluster struct {
+ // Name is the nickname for this Cluster
+ Name string `json:"name"`
+ // Cluster holds the cluster information
+ Cluster Cluster `json:"cluster"`
+}
+
+// NamedContext relates nicknames to context information
+type NamedContext struct {
+ // Name is the nickname for this Context
+ Name string `json:"name"`
+ // Context holds the context information
+ Context Context `json:"context"`
+}
+
+// NamedAuthInfo relates nicknames to auth information
+type NamedAuthInfo struct {
+ // Name is the nickname for this AuthInfo
+ Name string `json:"name"`
+ // AuthInfo holds the auth information
+ AuthInfo AuthInfo `json:"user"`
+}
+
+// NamedExtension relates nicknames to extension information
+type NamedExtension struct {
+ // Name is the nickname for this Extension
+ Name string `json:"name"`
+ // Extension holds the extension information
+ Extension runtime.RawExtension `json:"extension"`
+}
+
+// AuthProviderConfig holds the configuration for a specified auth provider.
+type AuthProviderConfig struct {
+ Name string `json:"name"`
+ Config map[string]string `json:"config"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go
new file mode 100644
index 0000000..0abc425
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go
@@ -0,0 +1,91 @@
+/*
+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 clientcmd
+
+import (
+ "encoding/json"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+
+ clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth"
+)
+
+// AuthLoaders are used to build clientauth.Info objects.
+type AuthLoader interface {
+ // LoadAuth takes a path to a config file and can then do anything it needs in order to return a valid clientauth.Info
+ LoadAuth(path string) (*clientauth.Info, error)
+}
+
+// default implementation of an AuthLoader
+type defaultAuthLoader struct{}
+
+// LoadAuth for defaultAuthLoader simply delegates to clientauth.LoadFromFile
+func (*defaultAuthLoader) LoadAuth(path string) (*clientauth.Info, error) {
+ return clientauth.LoadFromFile(path)
+}
+
+type PromptingAuthLoader struct {
+ reader io.Reader
+}
+
+// LoadAuth parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist.
+func (a *PromptingAuthLoader) LoadAuth(path string) (*clientauth.Info, error) {
+ var auth clientauth.Info
+ // Prompt for user/pass and write a file if none exists.
+ if _, err := os.Stat(path); os.IsNotExist(err) {
+ auth = *a.Prompt()
+ data, err := json.Marshal(auth)
+ if err != nil {
+ return &auth, err
+ }
+ err = ioutil.WriteFile(path, data, 0600)
+ return &auth, err
+ }
+ authPtr, err := clientauth.LoadFromFile(path)
+ if err != nil {
+ return nil, err
+ }
+ return authPtr, nil
+}
+
+// Prompt pulls the user and password from a reader
+func (a *PromptingAuthLoader) Prompt() *clientauth.Info {
+ auth := &clientauth.Info{}
+ auth.User = promptForString("Username", a.reader)
+ auth.Password = promptForString("Password", a.reader)
+
+ return auth
+}
+
+func promptForString(field string, r io.Reader) string {
+ fmt.Printf("Please enter %s: ", field)
+ var result string
+ fmt.Fscan(r, &result)
+ return result
+}
+
+// NewPromptingAuthLoader is an AuthLoader that parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist.
+func NewPromptingAuthLoader(reader io.Reader) *PromptingAuthLoader {
+ return &PromptingAuthLoader{reader}
+}
+
+// NewDefaultAuthLoader returns a default implementation of an AuthLoader that only reads from a config file
+func NewDefaultAuthLoader() AuthLoader {
+ return &defaultAuthLoader{}
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go
new file mode 100644
index 0000000..47b14e2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go
@@ -0,0 +1,411 @@
+/*
+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 clientcmd
+
+import (
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/url"
+ "os"
+ "strings"
+
+ "github.com/golang/glog"
+ "github.com/imdario/mergo"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/client/restclient"
+ clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth"
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+)
+
+var (
+ // DefaultCluster is the cluster config used when no other config is specified
+ // TODO: eventually apiserver should start on 443 and be secure by default
+ DefaultCluster = clientcmdapi.Cluster{Server: "http://localhost:8080"}
+
+ // EnvVarCluster allows overriding the DefaultCluster using an envvar for the server name
+ EnvVarCluster = clientcmdapi.Cluster{Server: os.Getenv("KUBERNETES_MASTER")}
+
+ DefaultClientConfig = DirectClientConfig{*clientcmdapi.NewConfig(), "", &ConfigOverrides{}, nil, NewDefaultClientConfigLoadingRules()}
+)
+
+// ClientConfig is used to make it easy to get an api server client
+type ClientConfig interface {
+ // RawConfig returns the merged result of all overrides
+ RawConfig() (clientcmdapi.Config, error)
+ // ClientConfig returns a complete client config
+ ClientConfig() (*restclient.Config, error)
+ // Namespace returns the namespace resulting from the merged
+ // result of all overrides and a boolean indicating if it was
+ // overridden
+ Namespace() (string, bool, error)
+ // ConfigAccess returns the rules for loading/persisting the config.
+ ConfigAccess() ConfigAccess
+}
+
+type PersistAuthProviderConfigForUser func(user string) restclient.AuthProviderConfigPersister
+
+// DirectClientConfig is a ClientConfig interface that is backed by a clientcmdapi.Config, options overrides, and an optional fallbackReader for auth information
+type DirectClientConfig struct {
+ config clientcmdapi.Config
+ contextName string
+ overrides *ConfigOverrides
+ fallbackReader io.Reader
+ configAccess ConfigAccess
+}
+
+// NewDefaultClientConfig creates a DirectClientConfig using the config.CurrentContext as the context name
+func NewDefaultClientConfig(config clientcmdapi.Config, overrides *ConfigOverrides) ClientConfig {
+ return &DirectClientConfig{config, config.CurrentContext, overrides, nil, NewDefaultClientConfigLoadingRules()}
+}
+
+// NewNonInteractiveClientConfig creates a DirectClientConfig using the passed context name and does not have a fallback reader for auth information
+func NewNonInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, configAccess ConfigAccess) ClientConfig {
+ return &DirectClientConfig{config, contextName, overrides, nil, configAccess}
+}
+
+// NewInteractiveClientConfig creates a DirectClientConfig using the passed context name and a reader in case auth information is not provided via files or flags
+func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, fallbackReader io.Reader, configAccess ConfigAccess) ClientConfig {
+ return &DirectClientConfig{config, contextName, overrides, fallbackReader, configAccess}
+}
+
+func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) {
+ return config.config, nil
+}
+
+// ClientConfig implements ClientConfig
+func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) {
+ if err := config.ConfirmUsable(); err != nil {
+ return nil, err
+ }
+
+ configAuthInfo := config.getAuthInfo()
+ configClusterInfo := config.getCluster()
+
+ clientConfig := &restclient.Config{}
+ clientConfig.Host = configClusterInfo.Server
+ if u, err := url.ParseRequestURI(clientConfig.Host); err == nil && u.Opaque == "" && len(u.Path) > 1 {
+ u.RawQuery = ""
+ u.Fragment = ""
+ clientConfig.Host = u.String()
+ }
+ if len(configAuthInfo.Impersonate) > 0 {
+ clientConfig.Impersonate = configAuthInfo.Impersonate
+ }
+
+ // only try to read the auth information if we are secure
+ if restclient.IsConfigTransportTLS(*clientConfig) {
+ var err error
+
+ // mergo is a first write wins for map value and a last writing wins for interface values
+ // NOTE: This behavior changed with https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a.
+ // Our mergo.Merge version is older than this change.
+ var persister restclient.AuthProviderConfigPersister
+ if config.configAccess != nil {
+ persister = PersisterForUser(config.configAccess, config.getAuthInfoName())
+ }
+ userAuthPartialConfig, err := getUserIdentificationPartialConfig(configAuthInfo, config.fallbackReader, persister)
+ if err != nil {
+ return nil, err
+ }
+ mergo.Merge(clientConfig, userAuthPartialConfig)
+
+ serverAuthPartialConfig, err := getServerIdentificationPartialConfig(configAuthInfo, configClusterInfo)
+ if err != nil {
+ return nil, err
+ }
+ mergo.Merge(clientConfig, serverAuthPartialConfig)
+ }
+
+ return clientConfig, nil
+}
+
+// clientauth.Info object contain both user identification and server identification. We want different precedence orders for
+// both, so we have to split the objects and merge them separately
+// we want this order of precedence for the server identification
+// 1. configClusterInfo (the final result of command line flags and merged .kubeconfig files)
+// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority)
+// 3. load the ~/.kubernetes_auth file as a default
+func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) {
+ mergedConfig := &restclient.Config{}
+
+ // configClusterInfo holds the information identify the server provided by .kubeconfig
+ configClientConfig := &restclient.Config{}
+ configClientConfig.CAFile = configClusterInfo.CertificateAuthority
+ configClientConfig.CAData = configClusterInfo.CertificateAuthorityData
+ configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify
+ mergo.Merge(mergedConfig, configClientConfig)
+
+ return mergedConfig, nil
+}
+
+// clientauth.Info object contain both user identification and server identification. We want different precedence orders for
+// both, so we have to split the objects and merge them separately
+// we want this order of precedence for user identifcation
+// 1. configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files)
+// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority)
+// 3. if there is not enough information to idenfity the user, load try the ~/.kubernetes_auth file
+// 4. if there is not enough information to identify the user, prompt if possible
+func getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig restclient.AuthProviderConfigPersister) (*restclient.Config, error) {
+ mergedConfig := &restclient.Config{}
+
+ // blindly overwrite existing values based on precedence
+ if len(configAuthInfo.Token) > 0 {
+ mergedConfig.BearerToken = configAuthInfo.Token
+ }
+ if len(configAuthInfo.Impersonate) > 0 {
+ mergedConfig.Impersonate = configAuthInfo.Impersonate
+ }
+ if len(configAuthInfo.ClientCertificate) > 0 || len(configAuthInfo.ClientCertificateData) > 0 {
+ mergedConfig.CertFile = configAuthInfo.ClientCertificate
+ mergedConfig.CertData = configAuthInfo.ClientCertificateData
+ mergedConfig.KeyFile = configAuthInfo.ClientKey
+ mergedConfig.KeyData = configAuthInfo.ClientKeyData
+ }
+ if len(configAuthInfo.Username) > 0 || len(configAuthInfo.Password) > 0 {
+ mergedConfig.Username = configAuthInfo.Username
+ mergedConfig.Password = configAuthInfo.Password
+ }
+ if configAuthInfo.AuthProvider != nil {
+ mergedConfig.AuthProvider = configAuthInfo.AuthProvider
+ mergedConfig.AuthConfigPersister = persistAuthConfig
+ }
+
+ // if there still isn't enough information to authenticate the user, try prompting
+ if !canIdentifyUser(*mergedConfig) && (fallbackReader != nil) {
+ prompter := NewPromptingAuthLoader(fallbackReader)
+ promptedAuthInfo := prompter.Prompt()
+
+ promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo)
+ previouslyMergedConfig := mergedConfig
+ mergedConfig = &restclient.Config{}
+ mergo.Merge(mergedConfig, promptedConfig)
+ mergo.Merge(mergedConfig, previouslyMergedConfig)
+ }
+
+ return mergedConfig, nil
+}
+
+// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only user identification information
+func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config {
+ config := &restclient.Config{}
+ config.Username = info.User
+ config.Password = info.Password
+ config.CertFile = info.CertFile
+ config.KeyFile = info.KeyFile
+ config.BearerToken = info.BearerToken
+ return config
+}
+
+// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only server identification information
+func makeServerIdentificationConfig(info clientauth.Info) restclient.Config {
+ config := restclient.Config{}
+ config.CAFile = info.CAFile
+ if info.Insecure != nil {
+ config.Insecure = *info.Insecure
+ }
+ return config
+}
+
+func canIdentifyUser(config restclient.Config) bool {
+ return len(config.Username) > 0 ||
+ (len(config.CertFile) > 0 || len(config.CertData) > 0) ||
+ len(config.BearerToken) > 0 ||
+ config.AuthProvider != nil
+}
+
+// Namespace implements ClientConfig
+func (config *DirectClientConfig) Namespace() (string, bool, error) {
+ if err := config.ConfirmUsable(); err != nil {
+ return "", false, err
+ }
+
+ configContext := config.getContext()
+
+ if len(configContext.Namespace) == 0 {
+ return api.NamespaceDefault, false, nil
+ }
+
+ overridden := false
+ if config.overrides != nil && config.overrides.Context.Namespace != "" {
+ overridden = true
+ }
+ return configContext.Namespace, overridden, nil
+}
+
+// ConfigAccess implements ClientConfig
+func (config *DirectClientConfig) ConfigAccess() ConfigAccess {
+ return config.configAccess
+}
+
+// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config,
+// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible.
+func (config *DirectClientConfig) ConfirmUsable() error {
+ validationErrors := make([]error, 0)
+ validationErrors = append(validationErrors, validateAuthInfo(config.getAuthInfoName(), config.getAuthInfo())...)
+ validationErrors = append(validationErrors, validateClusterInfo(config.getClusterName(), config.getCluster())...)
+ // when direct client config is specified, and our only error is that no server is defined, we should
+ // return a standard "no config" error
+ if len(validationErrors) == 1 && validationErrors[0] == ErrEmptyCluster {
+ return newErrConfigurationInvalid([]error{ErrEmptyConfig})
+ }
+ return newErrConfigurationInvalid(validationErrors)
+}
+
+func (config *DirectClientConfig) getContextName() string {
+ if len(config.overrides.CurrentContext) != 0 {
+ return config.overrides.CurrentContext
+ }
+ if len(config.contextName) != 0 {
+ return config.contextName
+ }
+
+ return config.config.CurrentContext
+}
+
+func (config *DirectClientConfig) getAuthInfoName() string {
+ if len(config.overrides.Context.AuthInfo) != 0 {
+ return config.overrides.Context.AuthInfo
+ }
+ return config.getContext().AuthInfo
+}
+
+func (config *DirectClientConfig) getClusterName() string {
+ if len(config.overrides.Context.Cluster) != 0 {
+ return config.overrides.Context.Cluster
+ }
+ return config.getContext().Cluster
+}
+
+func (config *DirectClientConfig) getContext() clientcmdapi.Context {
+ contexts := config.config.Contexts
+ contextName := config.getContextName()
+
+ var mergedContext clientcmdapi.Context
+ if configContext, exists := contexts[contextName]; exists {
+ mergo.Merge(&mergedContext, configContext)
+ }
+ mergo.Merge(&mergedContext, config.overrides.Context)
+
+ return mergedContext
+}
+
+func (config *DirectClientConfig) getAuthInfo() clientcmdapi.AuthInfo {
+ authInfos := config.config.AuthInfos
+ authInfoName := config.getAuthInfoName()
+
+ var mergedAuthInfo clientcmdapi.AuthInfo
+ if configAuthInfo, exists := authInfos[authInfoName]; exists {
+ mergo.Merge(&mergedAuthInfo, configAuthInfo)
+ }
+ mergo.Merge(&mergedAuthInfo, config.overrides.AuthInfo)
+
+ return mergedAuthInfo
+}
+
+func (config *DirectClientConfig) getCluster() clientcmdapi.Cluster {
+ clusterInfos := config.config.Clusters
+ clusterInfoName := config.getClusterName()
+
+ var mergedClusterInfo clientcmdapi.Cluster
+ mergo.Merge(&mergedClusterInfo, DefaultCluster)
+ mergo.Merge(&mergedClusterInfo, EnvVarCluster)
+ if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists {
+ mergo.Merge(&mergedClusterInfo, configClusterInfo)
+ }
+ mergo.Merge(&mergedClusterInfo, config.overrides.ClusterInfo)
+ // An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data
+ // otherwise, a kubeconfig containing a CA reference would return an error that "CA and insecure-skip-tls-verify couldn't both be set"
+ caLen := len(config.overrides.ClusterInfo.CertificateAuthority)
+ caDataLen := len(config.overrides.ClusterInfo.CertificateAuthorityData)
+ if config.overrides.ClusterInfo.InsecureSkipTLSVerify && caLen == 0 && caDataLen == 0 {
+ mergedClusterInfo.CertificateAuthority = ""
+ mergedClusterInfo.CertificateAuthorityData = nil
+ }
+
+ return mergedClusterInfo
+}
+
+// inClusterClientConfig makes a config that will work from within a kubernetes cluster container environment.
+type inClusterClientConfig struct{}
+
+func (inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) {
+ return clientcmdapi.Config{}, fmt.Errorf("inCluster environment config doesn't support multiple clusters")
+}
+
+func (inClusterClientConfig) ClientConfig() (*restclient.Config, error) {
+ return restclient.InClusterConfig()
+}
+
+func (inClusterClientConfig) Namespace() (string, error) {
+ // This way assumes you've set the POD_NAMESPACE environment variable using the downward API.
+ // This check has to be done first for backwards compatibility with the way InClusterConfig was originally set up
+ if ns := os.Getenv("POD_NAMESPACE"); ns != "" {
+ return ns, nil
+ }
+
+ // Fall back to the namespace associated with the service account token, if available
+ if data, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace"); err == nil {
+ if ns := strings.TrimSpace(string(data)); len(ns) > 0 {
+ return ns, nil
+ }
+ }
+
+ return "default", nil
+}
+
+func (inClusterClientConfig) ConfigAccess() ConfigAccess {
+ return NewDefaultClientConfigLoadingRules()
+}
+
+// Possible returns true if loading an inside-kubernetes-cluster is possible.
+func (inClusterClientConfig) Possible() bool {
+ fi, err := os.Stat("/var/run/secrets/kubernetes.io/serviceaccount/token")
+ return os.Getenv("KUBERNETES_SERVICE_HOST") != "" &&
+ os.Getenv("KUBERNETES_SERVICE_PORT") != "" &&
+ err == nil && !fi.IsDir()
+}
+
+// BuildConfigFromFlags is a helper function that builds configs from a master
+// url or a kubeconfig filepath. These are passed in as command line flags for cluster
+// components. Warnings should reflect this usage. If neither masterUrl or kubeconfigPath
+// are passed in we fallback to inClusterConfig. If inClusterConfig fails, we fallback
+// to the default config.
+func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) {
+ if kubeconfigPath == "" && masterUrl == "" {
+ glog.Warningf("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.")
+ kubeconfig, err := restclient.InClusterConfig()
+ if err == nil {
+ return kubeconfig, nil
+ }
+ glog.Warning("error creating inClusterConfig, falling back to default config: ", err)
+ }
+ return NewNonInteractiveDeferredLoadingClientConfig(
+ &ClientConfigLoadingRules{ExplicitPath: kubeconfigPath},
+ &ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterUrl}}).ClientConfig()
+}
+
+// BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master
+// url and a kubeconfigGetter.
+func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*restclient.Config, error) {
+ // TODO: We do not need a DeferredLoader here. Refactor code and see if we can use DirectClientConfig here.
+ cc := NewNonInteractiveDeferredLoadingClientConfig(
+ &ClientConfigGetter{kubeconfigGetter: kubeconfigGetter},
+ &ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterUrl}})
+ return cc.ClientConfig()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go
new file mode 100644
index 0000000..9df69a7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go
@@ -0,0 +1,472 @@
+/*
+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 clientcmd
+
+import (
+ "errors"
+ "os"
+ "path"
+ "path/filepath"
+ "reflect"
+ "sort"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/client/restclient"
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+)
+
+// ConfigAccess is used by subcommands and methods in this package to load and modify the appropriate config files
+type ConfigAccess interface {
+ // GetLoadingPrecedence returns the slice of files that should be used for loading and inspecting the config
+ GetLoadingPrecedence() []string
+ // GetStartingConfig returns the config that subcommands should being operating against. It may or may not be merged depending on loading rules
+ GetStartingConfig() (*clientcmdapi.Config, error)
+ // GetDefaultFilename returns the name of the file you should write into (create if necessary), if you're trying to create a new stanza as opposed to updating an existing one.
+ GetDefaultFilename() string
+ // IsExplicitFile indicates whether or not this command is interested in exactly one file. This implementation only ever does that via a flag, but implementations that handle local, global, and flags may have more
+ IsExplicitFile() bool
+ // GetExplicitFile returns the particular file this command is operating against. This implementation only ever has one, but implementations that handle local, global, and flags may have more
+ GetExplicitFile() string
+}
+
+type PathOptions struct {
+ // GlobalFile is the full path to the file to load as the global (final) option
+ GlobalFile string
+ // EnvVar is the env var name that points to the list of kubeconfig files to load
+ EnvVar string
+ // ExplicitFileFlag is the name of the flag to use for prompting for the kubeconfig file
+ ExplicitFileFlag string
+
+ // GlobalFileSubpath is an optional value used for displaying help
+ GlobalFileSubpath string
+
+ LoadingRules *ClientConfigLoadingRules
+}
+
+func (o *PathOptions) GetEnvVarFiles() []string {
+ if len(o.EnvVar) == 0 {
+ return []string{}
+ }
+
+ envVarValue := os.Getenv(o.EnvVar)
+ if len(envVarValue) == 0 {
+ return []string{}
+ }
+
+ return filepath.SplitList(envVarValue)
+}
+
+func (o *PathOptions) GetLoadingPrecedence() []string {
+ if envVarFiles := o.GetEnvVarFiles(); len(envVarFiles) > 0 {
+ return envVarFiles
+ }
+
+ return []string{o.GlobalFile}
+}
+
+func (o *PathOptions) GetStartingConfig() (*clientcmdapi.Config, error) {
+ // don't mutate the original
+ loadingRules := *o.LoadingRules
+ loadingRules.Precedence = o.GetLoadingPrecedence()
+
+ clientConfig := NewNonInteractiveDeferredLoadingClientConfig(&loadingRules, &ConfigOverrides{})
+ rawConfig, err := clientConfig.RawConfig()
+ if os.IsNotExist(err) {
+ return clientcmdapi.NewConfig(), nil
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ return &rawConfig, nil
+}
+
+func (o *PathOptions) GetDefaultFilename() string {
+ if o.IsExplicitFile() {
+ return o.GetExplicitFile()
+ }
+
+ if envVarFiles := o.GetEnvVarFiles(); len(envVarFiles) > 0 {
+ if len(envVarFiles) == 1 {
+ return envVarFiles[0]
+ }
+
+ // if any of the envvar files already exists, return it
+ for _, envVarFile := range envVarFiles {
+ if _, err := os.Stat(envVarFile); err == nil {
+ return envVarFile
+ }
+ }
+
+ // otherwise, return the last one in the list
+ return envVarFiles[len(envVarFiles)-1]
+ }
+
+ return o.GlobalFile
+}
+
+func (o *PathOptions) IsExplicitFile() bool {
+ if len(o.LoadingRules.ExplicitPath) > 0 {
+ return true
+ }
+
+ return false
+}
+
+func (o *PathOptions) GetExplicitFile() string {
+ return o.LoadingRules.ExplicitPath
+}
+
+func NewDefaultPathOptions() *PathOptions {
+ ret := &PathOptions{
+ GlobalFile: RecommendedHomeFile,
+ EnvVar: RecommendedConfigPathEnvVar,
+ ExplicitFileFlag: RecommendedConfigPathFlag,
+
+ GlobalFileSubpath: path.Join(RecommendedHomeDir, RecommendedFileName),
+
+ LoadingRules: NewDefaultClientConfigLoadingRules(),
+ }
+ ret.LoadingRules.DoNotResolvePaths = true
+
+ return ret
+}
+
+// ModifyConfig takes a Config object, iterates through Clusters, AuthInfos, and Contexts, uses the LocationOfOrigin if specified or
+// uses the default destination file to write the results into. This results in multiple file reads, but it's very easy to follow.
+// Preferences and CurrentContext should always be set in the default destination file. Since we can't distinguish between empty and missing values
+// (no nil strings), we're forced have separate handling for them. In the kubeconfig cases, newConfig should have at most one difference,
+// that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any
+// modified element.
+func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error {
+ possibleSources := configAccess.GetLoadingPrecedence()
+ // sort the possible kubeconfig files so we always "lock" in the same order
+ // to avoid deadlock (note: this can fail w/ symlinks, but... come on).
+ sort.Strings(possibleSources)
+ for _, filename := range possibleSources {
+ if err := lockFile(filename); err != nil {
+ return err
+ }
+ defer unlockFile(filename)
+ }
+
+ startingConfig, err := configAccess.GetStartingConfig()
+ if err != nil {
+ return err
+ }
+
+ // We need to find all differences, locate their original files, read a partial config to modify only that stanza and write out the file.
+ // Special case the test for current context and preferences since those always write to the default file.
+ if reflect.DeepEqual(*startingConfig, newConfig) {
+ // nothing to do
+ return nil
+ }
+
+ if startingConfig.CurrentContext != newConfig.CurrentContext {
+ if err := writeCurrentContext(configAccess, newConfig.CurrentContext); err != nil {
+ return err
+ }
+ }
+
+ if !reflect.DeepEqual(startingConfig.Preferences, newConfig.Preferences) {
+ if err := writePreferences(configAccess, newConfig.Preferences); err != nil {
+ return err
+ }
+ }
+
+ // Search every cluster, authInfo, and context. First from new to old for differences, then from old to new for deletions
+ for key, cluster := range newConfig.Clusters {
+ startingCluster, exists := startingConfig.Clusters[key]
+ if !reflect.DeepEqual(cluster, startingCluster) || !exists {
+ destinationFile := cluster.LocationOfOrigin
+ if len(destinationFile) == 0 {
+ destinationFile = configAccess.GetDefaultFilename()
+ }
+
+ configToWrite, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ t := *cluster
+
+ configToWrite.Clusters[key] = &t
+ configToWrite.Clusters[key].LocationOfOrigin = destinationFile
+ if relativizePaths {
+ if err := RelativizeClusterLocalPaths(configToWrite.Clusters[key]); err != nil {
+ return err
+ }
+ }
+
+ if err := WriteToFile(*configToWrite, destinationFile); err != nil {
+ return err
+ }
+ }
+ }
+
+ for key, context := range newConfig.Contexts {
+ startingContext, exists := startingConfig.Contexts[key]
+ if !reflect.DeepEqual(context, startingContext) || !exists {
+ destinationFile := context.LocationOfOrigin
+ if len(destinationFile) == 0 {
+ destinationFile = configAccess.GetDefaultFilename()
+ }
+
+ configToWrite, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ configToWrite.Contexts[key] = context
+
+ if err := WriteToFile(*configToWrite, destinationFile); err != nil {
+ return err
+ }
+ }
+ }
+
+ for key, authInfo := range newConfig.AuthInfos {
+ startingAuthInfo, exists := startingConfig.AuthInfos[key]
+ if !reflect.DeepEqual(authInfo, startingAuthInfo) || !exists {
+ destinationFile := authInfo.LocationOfOrigin
+ if len(destinationFile) == 0 {
+ destinationFile = configAccess.GetDefaultFilename()
+ }
+
+ configToWrite, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ t := *authInfo
+ configToWrite.AuthInfos[key] = &t
+ configToWrite.AuthInfos[key].LocationOfOrigin = destinationFile
+ if relativizePaths {
+ if err := RelativizeAuthInfoLocalPaths(configToWrite.AuthInfos[key]); err != nil {
+ return err
+ }
+ }
+
+ if err := WriteToFile(*configToWrite, destinationFile); err != nil {
+ return err
+ }
+ }
+ }
+
+ for key, cluster := range startingConfig.Clusters {
+ if _, exists := newConfig.Clusters[key]; !exists {
+ destinationFile := cluster.LocationOfOrigin
+ if len(destinationFile) == 0 {
+ destinationFile = configAccess.GetDefaultFilename()
+ }
+
+ configToWrite, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ delete(configToWrite.Clusters, key)
+
+ if err := WriteToFile(*configToWrite, destinationFile); err != nil {
+ return err
+ }
+ }
+ }
+
+ for key, context := range startingConfig.Contexts {
+ if _, exists := newConfig.Contexts[key]; !exists {
+ destinationFile := context.LocationOfOrigin
+ if len(destinationFile) == 0 {
+ destinationFile = configAccess.GetDefaultFilename()
+ }
+
+ configToWrite, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ delete(configToWrite.Contexts, key)
+
+ if err := WriteToFile(*configToWrite, destinationFile); err != nil {
+ return err
+ }
+ }
+ }
+
+ for key, authInfo := range startingConfig.AuthInfos {
+ if _, exists := newConfig.AuthInfos[key]; !exists {
+ destinationFile := authInfo.LocationOfOrigin
+ if len(destinationFile) == 0 {
+ destinationFile = configAccess.GetDefaultFilename()
+ }
+
+ configToWrite, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ delete(configToWrite.AuthInfos, key)
+
+ if err := WriteToFile(*configToWrite, destinationFile); err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+func PersisterForUser(configAccess ConfigAccess, user string) restclient.AuthProviderConfigPersister {
+ return &persister{configAccess, user}
+}
+
+type persister struct {
+ configAccess ConfigAccess
+ user string
+}
+
+func (p *persister) Persist(config map[string]string) error {
+ newConfig, err := p.configAccess.GetStartingConfig()
+ if err != nil {
+ return err
+ }
+ authInfo, ok := newConfig.AuthInfos[p.user]
+ if ok && authInfo.AuthProvider != nil {
+ authInfo.AuthProvider.Config = config
+ ModifyConfig(p.configAccess, *newConfig, false)
+ }
+ return nil
+}
+
+// writeCurrentContext takes three possible paths.
+// If newCurrentContext is the same as the startingConfig's current context, then we exit.
+// If newCurrentContext has a value, then that value is written into the default destination file.
+// If newCurrentContext is empty, then we find the config file that is setting the CurrentContext and clear the value from that file
+func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) error {
+ if startingConfig, err := configAccess.GetStartingConfig(); err != nil {
+ return err
+ } else if startingConfig.CurrentContext == newCurrentContext {
+ return nil
+ }
+
+ if configAccess.IsExplicitFile() {
+ file := configAccess.GetExplicitFile()
+ currConfig, err := getConfigFromFile(file)
+ if err != nil {
+ return err
+ }
+ currConfig.CurrentContext = newCurrentContext
+ if err := WriteToFile(*currConfig, file); err != nil {
+ return err
+ }
+
+ return nil
+ }
+
+ if len(newCurrentContext) > 0 {
+ destinationFile := configAccess.GetDefaultFilename()
+ config, err := getConfigFromFile(destinationFile)
+ if err != nil {
+ return err
+ }
+ config.CurrentContext = newCurrentContext
+
+ if err := WriteToFile(*config, destinationFile); err != nil {
+ return err
+ }
+
+ return nil
+ }
+
+ // we're supposed to be clearing the current context. We need to find the first spot in the chain that is setting it and clear it
+ for _, file := range configAccess.GetLoadingPrecedence() {
+ if _, err := os.Stat(file); err == nil {
+ currConfig, err := getConfigFromFile(file)
+ if err != nil {
+ return err
+ }
+
+ if len(currConfig.CurrentContext) > 0 {
+ currConfig.CurrentContext = newCurrentContext
+ if err := WriteToFile(*currConfig, file); err != nil {
+ return err
+ }
+
+ return nil
+ }
+ }
+ }
+
+ return errors.New("no config found to write context")
+}
+
+func writePreferences(configAccess ConfigAccess, newPrefs clientcmdapi.Preferences) error {
+ if startingConfig, err := configAccess.GetStartingConfig(); err != nil {
+ return err
+ } else if reflect.DeepEqual(startingConfig.Preferences, newPrefs) {
+ return nil
+ }
+
+ if configAccess.IsExplicitFile() {
+ file := configAccess.GetExplicitFile()
+ currConfig, err := getConfigFromFile(file)
+ if err != nil {
+ return err
+ }
+ currConfig.Preferences = newPrefs
+ if err := WriteToFile(*currConfig, file); err != nil {
+ return err
+ }
+
+ return nil
+ }
+
+ for _, file := range configAccess.GetLoadingPrecedence() {
+ currConfig, err := getConfigFromFile(file)
+ if err != nil {
+ return err
+ }
+
+ if !reflect.DeepEqual(currConfig.Preferences, newPrefs) {
+ currConfig.Preferences = newPrefs
+ if err := WriteToFile(*currConfig, file); err != nil {
+ return err
+ }
+
+ return nil
+ }
+ }
+
+ return errors.New("no config found to write preferences")
+}
+
+// getConfigFromFile tries to read a kubeconfig file and if it can't, returns an error. One exception, missing files result in empty configs, not an error.
+func getConfigFromFile(filename string) (*clientcmdapi.Config, error) {
+ config, err := LoadFromFile(filename)
+ if err != nil && !os.IsNotExist(err) {
+ return nil, err
+ }
+ if config == nil {
+ config = clientcmdapi.NewConfig()
+ }
+ return config, nil
+}
+
+// GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit
+func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config {
+ config, err := getConfigFromFile(filename)
+ if err != nil {
+ glog.FatalDepth(1, err)
+ }
+
+ return config
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.go
new file mode 100644
index 0000000..30ef6f3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.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 clientcmd provides one stop shopping for building a working client from a fixed config,
+from a .kubeconfig file, from command line flags, or from any merged combination.
+
+Sample usage from merged .kubeconfig files (local directory, home directory)
+
+ loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
+ // if you want to change the loading rules (which files in which order), you can do so here
+
+ configOverrides := &clientcmd.ConfigOverrides{}
+ // if you want to change override values or bind them to flags, there are methods to help you
+
+ kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, configOverrides)
+ config, err := kubeConfig.ClientConfig()
+ if err != nil {
+ // Do something
+ }
+ client, err := unversioned.New(config)
+ // ...
+*/
+package clientcmd
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go
new file mode 100644
index 0000000..1009406
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go
@@ -0,0 +1,585 @@
+/*
+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 clientcmd
+
+import (
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "path"
+ "path/filepath"
+ goruntime "runtime"
+ "strings"
+
+ "github.com/golang/glog"
+ "github.com/imdario/mergo"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+ clientcmdlatest "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest"
+ "k8s.io/kubernetes/pkg/runtime"
+ utilerrors "k8s.io/kubernetes/pkg/util/errors"
+ "k8s.io/kubernetes/pkg/util/homedir"
+)
+
+const (
+ RecommendedConfigPathFlag = "kubeconfig"
+ RecommendedConfigPathEnvVar = "KUBECONFIG"
+ RecommendedHomeDir = ".kube"
+ RecommendedFileName = "config"
+ RecommendedSchemaName = "schema"
+)
+
+var RecommendedHomeFile = path.Join(homedir.HomeDir(), RecommendedHomeDir, RecommendedFileName)
+var RecommendedSchemaFile = path.Join(homedir.HomeDir(), RecommendedHomeDir, RecommendedSchemaName)
+
+// currentMigrationRules returns a map that holds the history of recommended home directories used in previous versions.
+// Any future changes to RecommendedHomeFile and related are expected to add a migration rule here, in order to make
+// sure existing config files are migrated to their new locations properly.
+func currentMigrationRules() map[string]string {
+ oldRecommendedHomeFile := path.Join(os.Getenv("HOME"), "/.kube/.kubeconfig")
+ oldRecommendedWindowsHomeFile := path.Join(os.Getenv("HOME"), RecommendedHomeDir, RecommendedFileName)
+
+ migrationRules := map[string]string{}
+ migrationRules[RecommendedHomeFile] = oldRecommendedHomeFile
+ if goruntime.GOOS == "windows" {
+ migrationRules[RecommendedHomeFile] = oldRecommendedWindowsHomeFile
+ }
+ return migrationRules
+}
+
+type ClientConfigLoader interface {
+ ConfigAccess
+ Load() (*clientcmdapi.Config, error)
+}
+
+type KubeconfigGetter func() (*clientcmdapi.Config, error)
+
+type ClientConfigGetter struct {
+ kubeconfigGetter KubeconfigGetter
+}
+
+// ClientConfigGetter implements the ClientConfigLoader interface.
+var _ ClientConfigLoader = &ClientConfigGetter{}
+
+func (g *ClientConfigGetter) Load() (*clientcmdapi.Config, error) {
+ return g.kubeconfigGetter()
+}
+
+func (g *ClientConfigGetter) GetLoadingPrecedence() []string {
+ return nil
+}
+func (g *ClientConfigGetter) GetStartingConfig() (*clientcmdapi.Config, error) {
+ return nil, nil
+}
+func (g *ClientConfigGetter) GetDefaultFilename() string {
+ return ""
+}
+func (g *ClientConfigGetter) IsExplicitFile() bool {
+ return false
+}
+func (g *ClientConfigGetter) GetExplicitFile() string {
+ return ""
+}
+
+// ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config
+// Callers can put the chain together however they want, but we'd recommend:
+// EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath
+// ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if thie file is not present
+type ClientConfigLoadingRules struct {
+ ExplicitPath string
+ Precedence []string
+
+ // MigrationRules is a map of destination files to source files. If a destination file is not present, then the source file is checked.
+ // If the source file is present, then it is copied to the destination file BEFORE any further loading happens.
+ MigrationRules map[string]string
+
+ // DoNotResolvePaths indicates whether or not to resolve paths with respect to the originating files. This is phrased as a negative so
+ // that a default object that doesn't set this will usually get the behavior it wants.
+ DoNotResolvePaths bool
+}
+
+// ClientConfigLoadingRules implements the ClientConfigLoader interface.
+var _ ClientConfigLoader = &ClientConfigLoadingRules{}
+
+// NewDefaultClientConfigLoadingRules returns a ClientConfigLoadingRules object with default fields filled in. You are not required to
+// use this constructor
+func NewDefaultClientConfigLoadingRules() *ClientConfigLoadingRules {
+ chain := []string{}
+
+ envVarFiles := os.Getenv(RecommendedConfigPathEnvVar)
+ if len(envVarFiles) != 0 {
+ chain = append(chain, filepath.SplitList(envVarFiles)...)
+
+ } else {
+ chain = append(chain, RecommendedHomeFile)
+ }
+
+ return &ClientConfigLoadingRules{
+ Precedence: chain,
+ MigrationRules: currentMigrationRules(),
+ }
+}
+
+// Load starts by running the MigrationRules and then
+// takes the loading rules and returns a Config object based on following rules.
+// if the ExplicitPath, return the unmerged explicit file
+// Otherwise, return a merged config based on the Precedence slice
+// A missing ExplicitPath file produces an error. Empty filenames or other missing files are ignored.
+// Read errors or files with non-deserializable content produce errors.
+// The first file to set a particular map key wins and map key's value is never changed.
+// BUT, if you set a struct value that is NOT contained inside of map, the value WILL be changed.
+// This results in some odd looking logic to merge in one direction, merge in the other, and then merge the two.
+// It also means that if two files specify a "red-user", only values from the first file's red-user are used. Even
+// non-conflicting entries from the second file's "red-user" are discarded.
+// Relative paths inside of the .kubeconfig files are resolved against the .kubeconfig file's parent folder
+// and only absolute file paths are returned.
+func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) {
+ if err := rules.Migrate(); err != nil {
+ return nil, err
+ }
+
+ errlist := []error{}
+
+ kubeConfigFiles := []string{}
+
+ // Make sure a file we were explicitly told to use exists
+ if len(rules.ExplicitPath) > 0 {
+ if _, err := os.Stat(rules.ExplicitPath); os.IsNotExist(err) {
+ return nil, err
+ }
+ kubeConfigFiles = append(kubeConfigFiles, rules.ExplicitPath)
+
+ } else {
+ kubeConfigFiles = append(kubeConfigFiles, rules.Precedence...)
+ }
+
+ kubeconfigs := []*clientcmdapi.Config{}
+ // read and cache the config files so that we only look at them once
+ for _, filename := range kubeConfigFiles {
+ if len(filename) == 0 {
+ // no work to do
+ continue
+ }
+
+ config, err := LoadFromFile(filename)
+ if os.IsNotExist(err) {
+ // skip missing files
+ continue
+ }
+ if err != nil {
+ errlist = append(errlist, fmt.Errorf("Error loading config file \"%s\": %v", filename, err))
+ continue
+ }
+
+ kubeconfigs = append(kubeconfigs, config)
+ }
+
+ // first merge all of our maps
+ mapConfig := clientcmdapi.NewConfig()
+ for _, kubeconfig := range kubeconfigs {
+ mergo.Merge(mapConfig, kubeconfig)
+ }
+
+ // merge all of the struct values in the reverse order so that priority is given correctly
+ // errors are not added to the list the second time
+ nonMapConfig := clientcmdapi.NewConfig()
+ for i := len(kubeconfigs) - 1; i >= 0; i-- {
+ kubeconfig := kubeconfigs[i]
+ mergo.Merge(nonMapConfig, kubeconfig)
+ }
+
+ // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and
+ // get the values we expect.
+ config := clientcmdapi.NewConfig()
+ mergo.Merge(config, mapConfig)
+ mergo.Merge(config, nonMapConfig)
+
+ if rules.ResolvePaths() {
+ if err := ResolveLocalPaths(config); err != nil {
+ errlist = append(errlist, err)
+ }
+ }
+
+ return config, utilerrors.NewAggregate(errlist)
+}
+
+// Migrate uses the MigrationRules map. If a destination file is not present, then the source file is checked.
+// If the source file is present, then it is copied to the destination file BEFORE any further loading happens.
+func (rules *ClientConfigLoadingRules) Migrate() error {
+ if rules.MigrationRules == nil {
+ return nil
+ }
+
+ for destination, source := range rules.MigrationRules {
+ if _, err := os.Stat(destination); err == nil {
+ // if the destination already exists, do nothing
+ continue
+ } else if os.IsPermission(err) {
+ // if we can't access the file, skip it
+ continue
+ } else if !os.IsNotExist(err) {
+ // if we had an error other than non-existence, fail
+ return err
+ }
+
+ if sourceInfo, err := os.Stat(source); err != nil {
+ if os.IsNotExist(err) || os.IsPermission(err) {
+ // if the source file doesn't exist or we can't access it, there's no work to do.
+ continue
+ }
+
+ // if we had an error other than non-existence, fail
+ return err
+ } else if sourceInfo.IsDir() {
+ return fmt.Errorf("cannot migrate %v to %v because it is a directory", source, destination)
+ }
+
+ in, err := os.Open(source)
+ if err != nil {
+ return err
+ }
+ defer in.Close()
+ out, err := os.Create(destination)
+ if err != nil {
+ return err
+ }
+ defer out.Close()
+
+ if _, err = io.Copy(out, in); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// GetLoadingPrecedence implements ConfigAccess
+func (rules *ClientConfigLoadingRules) GetLoadingPrecedence() []string {
+ return rules.Precedence
+}
+
+// GetStartingConfig implements ConfigAccess
+func (rules *ClientConfigLoadingRules) GetStartingConfig() (*clientcmdapi.Config, error) {
+ clientConfig := NewNonInteractiveDeferredLoadingClientConfig(rules, &ConfigOverrides{})
+ rawConfig, err := clientConfig.RawConfig()
+ if os.IsNotExist(err) {
+ return clientcmdapi.NewConfig(), nil
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ return &rawConfig, nil
+}
+
+// GetDefaultFilename implements ConfigAccess
+func (rules *ClientConfigLoadingRules) GetDefaultFilename() string {
+ // Explicit file if we have one.
+ if rules.IsExplicitFile() {
+ return rules.GetExplicitFile()
+ }
+ // Otherwise, first existing file from precedence.
+ for _, filename := range rules.GetLoadingPrecedence() {
+ if _, err := os.Stat(filename); err == nil {
+ return filename
+ }
+ }
+ // If none exists, use the first from precedence.
+ if len(rules.Precedence) > 0 {
+ return rules.Precedence[0]
+ }
+ return ""
+}
+
+// IsExplicitFile implements ConfigAccess
+func (rules *ClientConfigLoadingRules) IsExplicitFile() bool {
+ return len(rules.ExplicitPath) > 0
+}
+
+// GetExplicitFile implements ConfigAccess
+func (rules *ClientConfigLoadingRules) GetExplicitFile() string {
+ return rules.ExplicitPath
+}
+
+// LoadFromFile takes a filename and deserializes the contents into Config object
+func LoadFromFile(filename string) (*clientcmdapi.Config, error) {
+ kubeconfigBytes, err := ioutil.ReadFile(filename)
+ if err != nil {
+ return nil, err
+ }
+ config, err := Load(kubeconfigBytes)
+ if err != nil {
+ return nil, err
+ }
+ glog.V(6).Infoln("Config loaded from file", filename)
+
+ // set LocationOfOrigin on every Cluster, User, and Context
+ for key, obj := range config.AuthInfos {
+ obj.LocationOfOrigin = filename
+ config.AuthInfos[key] = obj
+ }
+ for key, obj := range config.Clusters {
+ obj.LocationOfOrigin = filename
+ config.Clusters[key] = obj
+ }
+ for key, obj := range config.Contexts {
+ obj.LocationOfOrigin = filename
+ config.Contexts[key] = obj
+ }
+
+ if config.AuthInfos == nil {
+ config.AuthInfos = map[string]*clientcmdapi.AuthInfo{}
+ }
+ if config.Clusters == nil {
+ config.Clusters = map[string]*clientcmdapi.Cluster{}
+ }
+ if config.Contexts == nil {
+ config.Contexts = map[string]*clientcmdapi.Context{}
+ }
+
+ return config, nil
+}
+
+// Load takes a byte slice and deserializes the contents into Config object.
+// Encapsulates deserialization without assuming the source is a file.
+func Load(data []byte) (*clientcmdapi.Config, error) {
+ config := clientcmdapi.NewConfig()
+ // if there's no data in a file, return the default object instead of failing (DecodeInto reject empty input)
+ if len(data) == 0 {
+ return config, nil
+ }
+ decoded, _, err := clientcmdlatest.Codec.Decode(data, &unversioned.GroupVersionKind{Version: clientcmdlatest.Version, Kind: "Config"}, config)
+ if err != nil {
+ return nil, err
+ }
+ return decoded.(*clientcmdapi.Config), nil
+}
+
+// WriteToFile serializes the config to yaml and writes it out to a file. If not present, it creates the file with the mode 0600. If it is present
+// it stomps the contents
+func WriteToFile(config clientcmdapi.Config, filename string) error {
+ content, err := Write(config)
+ if err != nil {
+ return err
+ }
+ dir := filepath.Dir(filename)
+ if _, err := os.Stat(dir); os.IsNotExist(err) {
+ if err = os.MkdirAll(dir, 0755); err != nil {
+ return err
+ }
+ }
+
+ if err := ioutil.WriteFile(filename, content, 0600); err != nil {
+ return err
+ }
+ return nil
+}
+
+func lockFile(filename string) error {
+ // TODO: find a way to do this with actual file locks. Will
+ // probably need seperate solution for windows and linux.
+
+ // Make sure the dir exists before we try to create a lock file.
+ dir := filepath.Dir(filename)
+ if _, err := os.Stat(dir); os.IsNotExist(err) {
+ if err = os.MkdirAll(dir, 0755); err != nil {
+ return err
+ }
+ }
+ f, err := os.OpenFile(lockName(filename), os.O_CREATE|os.O_EXCL, 0)
+ if err != nil {
+ return err
+ }
+ f.Close()
+ return nil
+}
+
+func unlockFile(filename string) error {
+ return os.Remove(lockName(filename))
+}
+
+func lockName(filename string) string {
+ return filename + ".lock"
+}
+
+// Write serializes the config to yaml.
+// Encapsulates serialization without assuming the destination is a file.
+func Write(config clientcmdapi.Config) ([]byte, error) {
+ return runtime.Encode(clientcmdlatest.Codec, &config)
+}
+
+func (rules ClientConfigLoadingRules) ResolvePaths() bool {
+ return !rules.DoNotResolvePaths
+}
+
+// ResolveLocalPaths resolves all relative paths in the config object with respect to the stanza's LocationOfOrigin
+// this cannot be done directly inside of LoadFromFile because doing so there would make it impossible to load a file without
+// modification of its contents.
+func ResolveLocalPaths(config *clientcmdapi.Config) error {
+ for _, cluster := range config.Clusters {
+ if len(cluster.LocationOfOrigin) == 0 {
+ continue
+ }
+ base, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin))
+ if err != nil {
+ return fmt.Errorf("Could not determine the absolute path of config file %s: %v", cluster.LocationOfOrigin, err)
+ }
+
+ if err := ResolvePaths(GetClusterFileReferences(cluster), base); err != nil {
+ return err
+ }
+ }
+ for _, authInfo := range config.AuthInfos {
+ if len(authInfo.LocationOfOrigin) == 0 {
+ continue
+ }
+ base, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin))
+ if err != nil {
+ return fmt.Errorf("Could not determine the absolute path of config file %s: %v", authInfo.LocationOfOrigin, err)
+ }
+
+ if err := ResolvePaths(GetAuthInfoFileReferences(authInfo), base); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// RelativizeClusterLocalPaths first absolutizes the paths by calling ResolveLocalPaths. This assumes that any NEW path is already
+// absolute, but any existing path will be resolved relative to LocationOfOrigin
+func RelativizeClusterLocalPaths(cluster *clientcmdapi.Cluster) error {
+ if len(cluster.LocationOfOrigin) == 0 {
+ return fmt.Errorf("no location of origin for %s", cluster.Server)
+ }
+ base, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin))
+ if err != nil {
+ return fmt.Errorf("could not determine the absolute path of config file %s: %v", cluster.LocationOfOrigin, err)
+ }
+
+ if err := ResolvePaths(GetClusterFileReferences(cluster), base); err != nil {
+ return err
+ }
+ if err := RelativizePathWithNoBacksteps(GetClusterFileReferences(cluster), base); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// RelativizeAuthInfoLocalPaths first absolutizes the paths by calling ResolveLocalPaths. This assumes that any NEW path is already
+// absolute, but any existing path will be resolved relative to LocationOfOrigin
+func RelativizeAuthInfoLocalPaths(authInfo *clientcmdapi.AuthInfo) error {
+ if len(authInfo.LocationOfOrigin) == 0 {
+ return fmt.Errorf("no location of origin for %v", authInfo)
+ }
+ base, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin))
+ if err != nil {
+ return fmt.Errorf("could not determine the absolute path of config file %s: %v", authInfo.LocationOfOrigin, err)
+ }
+
+ if err := ResolvePaths(GetAuthInfoFileReferences(authInfo), base); err != nil {
+ return err
+ }
+ if err := RelativizePathWithNoBacksteps(GetAuthInfoFileReferences(authInfo), base); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func RelativizeConfigPaths(config *clientcmdapi.Config, base string) error {
+ return RelativizePathWithNoBacksteps(GetConfigFileReferences(config), base)
+}
+
+func ResolveConfigPaths(config *clientcmdapi.Config, base string) error {
+ return ResolvePaths(GetConfigFileReferences(config), base)
+}
+
+func GetConfigFileReferences(config *clientcmdapi.Config) []*string {
+ refs := []*string{}
+
+ for _, cluster := range config.Clusters {
+ refs = append(refs, GetClusterFileReferences(cluster)...)
+ }
+ for _, authInfo := range config.AuthInfos {
+ refs = append(refs, GetAuthInfoFileReferences(authInfo)...)
+ }
+
+ return refs
+}
+
+func GetClusterFileReferences(cluster *clientcmdapi.Cluster) []*string {
+ return []*string{&cluster.CertificateAuthority}
+}
+
+func GetAuthInfoFileReferences(authInfo *clientcmdapi.AuthInfo) []*string {
+ return []*string{&authInfo.ClientCertificate, &authInfo.ClientKey}
+}
+
+// ResolvePaths updates the given refs to be absolute paths, relative to the given base directory
+func ResolvePaths(refs []*string, base string) error {
+ for _, ref := range refs {
+ // Don't resolve empty paths
+ if len(*ref) > 0 {
+ // Don't resolve absolute paths
+ if !filepath.IsAbs(*ref) {
+ *ref = filepath.Join(base, *ref)
+ }
+ }
+ }
+ return nil
+}
+
+// RelativizePathWithNoBacksteps updates the given refs to be relative paths, relative to the given base directory as long as they do not require backsteps.
+// Any path requiring a backstep is left as-is as long it is absolute. Any non-absolute path that can't be relativized produces an error
+func RelativizePathWithNoBacksteps(refs []*string, base string) error {
+ for _, ref := range refs {
+ // Don't relativize empty paths
+ if len(*ref) > 0 {
+ rel, err := MakeRelative(*ref, base)
+ if err != nil {
+ return err
+ }
+
+ // if we have a backstep, don't mess with the path
+ if strings.HasPrefix(rel, "../") {
+ if filepath.IsAbs(*ref) {
+ continue
+ }
+
+ return fmt.Errorf("%v requires backsteps and is not absolute", *ref)
+ }
+
+ *ref = rel
+ }
+ }
+ return nil
+}
+
+func MakeRelative(path, base string) (string, error) {
+ if len(path) > 0 {
+ rel, err := filepath.Rel(base, path)
+ if err != nil {
+ return path, err
+ }
+ return rel, nil
+ }
+ return path, nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go
new file mode 100644
index 0000000..0180469
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go
@@ -0,0 +1,122 @@
+/*
+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 clientcmd
+
+import (
+ "io"
+ "reflect"
+ "sync"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/client/restclient"
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+)
+
+// DeferredLoadingClientConfig is a ClientConfig interface that is backed by a client config loader.
+// It is used in cases where the loading rules may change after you've instantiated them and you want to be sure that
+// the most recent rules are used. This is useful in cases where you bind flags to loading rule parameters before
+// the parse happens and you want your calling code to be ignorant of how the values are being mutated to avoid
+// passing extraneous information down a call stack
+type DeferredLoadingClientConfig struct {
+ loader ClientConfigLoader
+ overrides *ConfigOverrides
+ fallbackReader io.Reader
+
+ clientConfig ClientConfig
+ loadingLock sync.Mutex
+}
+
+// NewNonInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name
+func NewNonInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides) ClientConfig {
+ return &DeferredLoadingClientConfig{loader: loader, overrides: overrides}
+}
+
+// NewInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name and the fallback auth reader
+func NewInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides, fallbackReader io.Reader) ClientConfig {
+ return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, fallbackReader: fallbackReader}
+}
+
+func (config *DeferredLoadingClientConfig) createClientConfig() (ClientConfig, error) {
+ if config.clientConfig == nil {
+ config.loadingLock.Lock()
+ defer config.loadingLock.Unlock()
+
+ if config.clientConfig == nil {
+ mergedConfig, err := config.loader.Load()
+ if err != nil {
+ return nil, err
+ }
+
+ var mergedClientConfig ClientConfig
+ if config.fallbackReader != nil {
+ mergedClientConfig = NewInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.fallbackReader, config.loader)
+ } else {
+ mergedClientConfig = NewNonInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.loader)
+ }
+
+ config.clientConfig = mergedClientConfig
+ }
+ }
+
+ return config.clientConfig, nil
+}
+
+func (config *DeferredLoadingClientConfig) RawConfig() (clientcmdapi.Config, error) {
+ mergedConfig, err := config.createClientConfig()
+ if err != nil {
+ return clientcmdapi.Config{}, err
+ }
+
+ return mergedConfig.RawConfig()
+}
+
+// ClientConfig implements ClientConfig
+func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, error) {
+ mergedClientConfig, err := config.createClientConfig()
+ if err != nil {
+ return nil, err
+ }
+
+ mergedConfig, err := mergedClientConfig.ClientConfig()
+ if err != nil {
+ return nil, err
+ }
+ // Are we running in a cluster and were no other configs found? If so, use the in-cluster-config.
+ icc := inClusterClientConfig{}
+ defaultConfig, err := DefaultClientConfig.ClientConfig()
+ if icc.Possible() && err == nil && reflect.DeepEqual(mergedConfig, defaultConfig) {
+ glog.V(2).Info("No kubeconfig could be created, falling back to service account.")
+ return icc.ClientConfig()
+ }
+ return mergedConfig, nil
+}
+
+// Namespace implements KubeConfig
+func (config *DeferredLoadingClientConfig) Namespace() (string, bool, error) {
+ mergedKubeConfig, err := config.createClientConfig()
+ if err != nil {
+ return "", false, err
+ }
+
+ return mergedKubeConfig.Namespace()
+}
+
+// ConfigAccess implements ClientConfig
+func (config *DeferredLoadingClientConfig) ConfigAccess() ConfigAccess {
+ return config.loader
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.go
new file mode 100644
index 0000000..40a35e6
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.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 clientcmd
+
+import (
+ "strconv"
+
+ "github.com/spf13/pflag"
+
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+)
+
+// ConfigOverrides holds values that should override whatever information is pulled from the actual Config object. You can't
+// simply use an actual Config object, because Configs hold maps, but overrides are restricted to "at most one"
+type ConfigOverrides struct {
+ AuthInfo clientcmdapi.AuthInfo
+ ClusterInfo clientcmdapi.Cluster
+ Context clientcmdapi.Context
+ CurrentContext string
+}
+
+// ConfigOverrideFlags holds the flag names to be used for binding command line flags. Notice that this structure tightly
+// corresponds to ConfigOverrides
+type ConfigOverrideFlags struct {
+ AuthOverrideFlags AuthOverrideFlags
+ ClusterOverrideFlags ClusterOverrideFlags
+ ContextOverrideFlags ContextOverrideFlags
+ CurrentContext FlagInfo
+}
+
+// AuthOverrideFlags holds the flag names to be used for binding command line flags for AuthInfo objects
+type AuthOverrideFlags struct {
+ ClientCertificate FlagInfo
+ ClientKey FlagInfo
+ Token FlagInfo
+ Impersonate FlagInfo
+ Username FlagInfo
+ Password FlagInfo
+}
+
+// ContextOverrideFlags holds the flag names to be used for binding command line flags for Cluster objects
+type ContextOverrideFlags struct {
+ ClusterName FlagInfo
+ AuthInfoName FlagInfo
+ Namespace FlagInfo
+}
+
+// ClusterOverride holds the flag names to be used for binding command line flags for Cluster objects
+type ClusterOverrideFlags struct {
+ APIServer FlagInfo
+ APIVersion FlagInfo
+ CertificateAuthority FlagInfo
+ InsecureSkipTLSVerify FlagInfo
+}
+
+// FlagInfo contains information about how to register a flag. This struct is useful if you want to provide a way for an extender to
+// get back a set of recommended flag names, descriptions, and defaults, but allow for customization by an extender. This makes for
+// coherent extension, without full prescription
+type FlagInfo struct {
+ // LongName is the long string for a flag. If this is empty, then the flag will not be bound
+ LongName string
+ // ShortName is the single character for a flag. If this is empty, then there will be no short flag
+ ShortName string
+ // Default is the default value for the flag
+ Default string
+ // Description is the description for the flag
+ Description string
+}
+
+// BindStringFlag binds the flag based on the provided info. If LongName == "", nothing is registered
+func (f FlagInfo) BindStringFlag(flags *pflag.FlagSet, target *string) {
+ // you can't register a flag without a long name
+ if len(f.LongName) > 0 {
+ flags.StringVarP(target, f.LongName, f.ShortName, f.Default, f.Description)
+ }
+}
+
+// BindBoolFlag binds the flag based on the provided info. If LongName == "", nothing is registered
+func (f FlagInfo) BindBoolFlag(flags *pflag.FlagSet, target *bool) {
+ // you can't register a flag without a long name
+ if len(f.LongName) > 0 {
+ // try to parse Default as a bool. If it fails, assume false
+ boolVal, err := strconv.ParseBool(f.Default)
+ if err != nil {
+ boolVal = false
+ }
+
+ flags.BoolVarP(target, f.LongName, f.ShortName, boolVal, f.Description)
+ }
+}
+
+const (
+ FlagClusterName = "cluster"
+ FlagAuthInfoName = "user"
+ FlagContext = "context"
+ FlagNamespace = "namespace"
+ FlagAPIServer = "server"
+ FlagAPIVersion = "api-version"
+ FlagInsecure = "insecure-skip-tls-verify"
+ FlagCertFile = "client-certificate"
+ FlagKeyFile = "client-key"
+ FlagCAFile = "certificate-authority"
+ FlagEmbedCerts = "embed-certs"
+ FlagBearerToken = "token"
+ FlagImpersonate = "as"
+ FlagUsername = "username"
+ FlagPassword = "password"
+)
+
+// RecommendedAuthOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing
+func RecommendedAuthOverrideFlags(prefix string) AuthOverrideFlags {
+ return AuthOverrideFlags{
+ ClientCertificate: FlagInfo{prefix + FlagCertFile, "", "", "Path to a client certificate file for TLS"},
+ ClientKey: FlagInfo{prefix + FlagKeyFile, "", "", "Path to a client key file for TLS"},
+ Token: FlagInfo{prefix + FlagBearerToken, "", "", "Bearer token for authentication to the API server"},
+ Impersonate: FlagInfo{prefix + FlagImpersonate, "", "", "Username to impersonate for the operation"},
+ Username: FlagInfo{prefix + FlagUsername, "", "", "Username for basic authentication to the API server"},
+ Password: FlagInfo{prefix + FlagPassword, "", "", "Password for basic authentication to the API server"},
+ }
+}
+
+// RecommendedClusterOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing
+func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags {
+ return ClusterOverrideFlags{
+ APIServer: FlagInfo{prefix + FlagAPIServer, "", "", "The address and port of the Kubernetes API server"},
+ APIVersion: FlagInfo{prefix + FlagAPIVersion, "", "", "DEPRECATED: The API version to use when talking to the server"},
+ CertificateAuthority: FlagInfo{prefix + FlagCAFile, "", "", "Path to a cert. file for the certificate authority"},
+ InsecureSkipTLSVerify: FlagInfo{prefix + FlagInsecure, "", "false", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure"},
+ }
+}
+
+// RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing
+func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags {
+ return ConfigOverrideFlags{
+ AuthOverrideFlags: RecommendedAuthOverrideFlags(prefix),
+ ClusterOverrideFlags: RecommendedClusterOverrideFlags(prefix),
+ ContextOverrideFlags: RecommendedContextOverrideFlags(prefix),
+ CurrentContext: FlagInfo{prefix + FlagContext, "", "", "The name of the kubeconfig context to use"},
+ }
+}
+
+// RecommendedContextOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing
+func RecommendedContextOverrideFlags(prefix string) ContextOverrideFlags {
+ return ContextOverrideFlags{
+ ClusterName: FlagInfo{prefix + FlagClusterName, "", "", "The name of the kubeconfig cluster to use"},
+ AuthInfoName: FlagInfo{prefix + FlagAuthInfoName, "", "", "The name of the kubeconfig user to use"},
+ Namespace: FlagInfo{prefix + FlagNamespace, "", "", "If present, the namespace scope for this CLI request"},
+ }
+}
+
+// BindAuthInfoFlags is a convenience method to bind the specified flags to their associated variables
+func BindAuthInfoFlags(authInfo *clientcmdapi.AuthInfo, flags *pflag.FlagSet, flagNames AuthOverrideFlags) {
+ flagNames.ClientCertificate.BindStringFlag(flags, &authInfo.ClientCertificate)
+ flagNames.ClientKey.BindStringFlag(flags, &authInfo.ClientKey)
+ flagNames.Token.BindStringFlag(flags, &authInfo.Token)
+ flagNames.Impersonate.BindStringFlag(flags, &authInfo.Impersonate)
+ flagNames.Username.BindStringFlag(flags, &authInfo.Username)
+ flagNames.Password.BindStringFlag(flags, &authInfo.Password)
+}
+
+// BindClusterFlags is a convenience method to bind the specified flags to their associated variables
+func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, flagNames ClusterOverrideFlags) {
+ flagNames.APIServer.BindStringFlag(flags, &clusterInfo.Server)
+ // TODO: remove --api-version flag in 1.3.
+ flagNames.APIVersion.BindStringFlag(flags, &clusterInfo.APIVersion)
+ flags.MarkDeprecated(FlagAPIVersion, "flag is no longer respected and will be deleted in the next release")
+ flagNames.CertificateAuthority.BindStringFlag(flags, &clusterInfo.CertificateAuthority)
+ flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify)
+}
+
+// BindOverrideFlags is a convenience method to bind the specified flags to their associated variables
+func BindOverrideFlags(overrides *ConfigOverrides, flags *pflag.FlagSet, flagNames ConfigOverrideFlags) {
+ BindAuthInfoFlags(&overrides.AuthInfo, flags, flagNames.AuthOverrideFlags)
+ BindClusterFlags(&overrides.ClusterInfo, flags, flagNames.ClusterOverrideFlags)
+ BindContextFlags(&overrides.Context, flags, flagNames.ContextOverrideFlags)
+ flagNames.CurrentContext.BindStringFlag(flags, &overrides.CurrentContext)
+}
+
+// BindFlags is a convenience method to bind the specified flags to their associated variables
+func BindContextFlags(contextInfo *clientcmdapi.Context, flags *pflag.FlagSet, flagNames ContextOverrideFlags) {
+ flagNames.ClusterName.BindStringFlag(flags, &contextInfo.Cluster)
+ flagNames.AuthInfoName.BindStringFlag(flags, &contextInfo.AuthInfo)
+ flagNames.Namespace.BindStringFlag(flags, &contextInfo.Namespace)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go
new file mode 100644
index 0000000..63f8ade
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go
@@ -0,0 +1,270 @@
+/*
+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 clientcmd
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "reflect"
+ "strings"
+
+ clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
+ utilerrors "k8s.io/kubernetes/pkg/util/errors"
+ "k8s.io/kubernetes/pkg/util/validation"
+)
+
+var (
+ ErrNoContext = errors.New("no context chosen")
+ ErrEmptyConfig = errors.New("no configuration has been provided")
+ // message is for consistency with old behavior
+ ErrEmptyCluster = errors.New("cluster has no server defined")
+)
+
+type errContextNotFound struct {
+ ContextName string
+}
+
+func (e *errContextNotFound) Error() string {
+ return fmt.Sprintf("context was not found for specified context: %v", e.ContextName)
+}
+
+// IsContextNotFound returns a boolean indicating whether the error is known to
+// report that a context was not found
+func IsContextNotFound(err error) bool {
+ if err == nil {
+ return false
+ }
+ if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext {
+ return true
+ }
+ return strings.Contains(err.Error(), "context was not found for specified context")
+}
+
+// IsEmptyConfig returns true if the provided error indicates the provided configuration
+// is empty.
+func IsEmptyConfig(err error) bool {
+ switch t := err.(type) {
+ case errConfigurationInvalid:
+ return len(t) == 1 && t[0] == ErrEmptyConfig
+ }
+ return err == ErrEmptyConfig
+}
+
+// errConfigurationInvalid is a set of errors indicating the configuration is invalid.
+type errConfigurationInvalid []error
+
+// errConfigurationInvalid implements error and Aggregate
+var _ error = errConfigurationInvalid{}
+var _ utilerrors.Aggregate = errConfigurationInvalid{}
+
+func newErrConfigurationInvalid(errs []error) error {
+ switch len(errs) {
+ case 0:
+ return nil
+ default:
+ return errConfigurationInvalid(errs)
+ }
+}
+
+// Error implements the error interface
+func (e errConfigurationInvalid) Error() string {
+ return fmt.Sprintf("invalid configuration: %v", utilerrors.NewAggregate(e).Error())
+}
+
+// Errors implements the AggregateError interface
+func (e errConfigurationInvalid) Errors() []error {
+ return e
+}
+
+// IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid.
+func IsConfigurationInvalid(err error) bool {
+ switch err.(type) {
+ case *errContextNotFound, errConfigurationInvalid:
+ return true
+ }
+ return IsContextNotFound(err)
+}
+
+// Validate checks for errors in the Config. It does not return early so that it can find as many errors as possible.
+func Validate(config clientcmdapi.Config) error {
+ validationErrors := make([]error, 0)
+
+ if clientcmdapi.IsConfigEmpty(&config) {
+ return newErrConfigurationInvalid([]error{ErrEmptyConfig})
+ }
+
+ if len(config.CurrentContext) != 0 {
+ if _, exists := config.Contexts[config.CurrentContext]; !exists {
+ validationErrors = append(validationErrors, &errContextNotFound{config.CurrentContext})
+ }
+ }
+
+ for contextName, context := range config.Contexts {
+ validationErrors = append(validationErrors, validateContext(contextName, *context, config)...)
+ }
+
+ for authInfoName, authInfo := range config.AuthInfos {
+ validationErrors = append(validationErrors, validateAuthInfo(authInfoName, *authInfo)...)
+ }
+
+ for clusterName, clusterInfo := range config.Clusters {
+ validationErrors = append(validationErrors, validateClusterInfo(clusterName, *clusterInfo)...)
+ }
+
+ return newErrConfigurationInvalid(validationErrors)
+}
+
+// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config,
+// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible.
+func ConfirmUsable(config clientcmdapi.Config, passedContextName string) error {
+ validationErrors := make([]error, 0)
+
+ if clientcmdapi.IsConfigEmpty(&config) {
+ return newErrConfigurationInvalid([]error{ErrEmptyConfig})
+ }
+
+ var contextName string
+ if len(passedContextName) != 0 {
+ contextName = passedContextName
+ } else {
+ contextName = config.CurrentContext
+ }
+
+ if len(contextName) == 0 {
+ return ErrNoContext
+ }
+
+ context, exists := config.Contexts[contextName]
+ if !exists {
+ validationErrors = append(validationErrors, &errContextNotFound{contextName})
+ }
+
+ if exists {
+ validationErrors = append(validationErrors, validateContext(contextName, *context, config)...)
+ validationErrors = append(validationErrors, validateAuthInfo(context.AuthInfo, *config.AuthInfos[context.AuthInfo])...)
+ validationErrors = append(validationErrors, validateClusterInfo(context.Cluster, *config.Clusters[context.Cluster])...)
+ }
+
+ return newErrConfigurationInvalid(validationErrors)
+}
+
+// validateClusterInfo looks for conflicts and errors in the cluster info
+func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) []error {
+ validationErrors := make([]error, 0)
+
+ if reflect.DeepEqual(clientcmdapi.Cluster{}, clusterInfo) {
+ return []error{ErrEmptyCluster}
+ }
+
+ if len(clusterInfo.Server) == 0 {
+ if len(clusterName) == 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("default cluster has no server defined"))
+ } else {
+ validationErrors = append(validationErrors, fmt.Errorf("no server found for cluster %q", clusterName))
+ }
+ }
+ // Make sure CA data and CA file aren't both specified
+ if len(clusterInfo.CertificateAuthority) != 0 && len(clusterInfo.CertificateAuthorityData) != 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("certificate-authority-data and certificate-authority are both specified for %v. certificate-authority-data will override.", clusterName))
+ }
+ if len(clusterInfo.CertificateAuthority) != 0 {
+ clientCertCA, err := os.Open(clusterInfo.CertificateAuthority)
+ defer clientCertCA.Close()
+ if err != nil {
+ validationErrors = append(validationErrors, fmt.Errorf("unable to read certificate-authority %v for %v due to %v", clusterInfo.CertificateAuthority, clusterName, err))
+ }
+ }
+
+ return validationErrors
+}
+
+// validateAuthInfo looks for conflicts and errors in the auth info
+func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []error {
+ validationErrors := make([]error, 0)
+
+ usingAuthPath := false
+ methods := make([]string, 0, 3)
+ if len(authInfo.Token) != 0 {
+ methods = append(methods, "token")
+ }
+ if len(authInfo.Username) != 0 || len(authInfo.Password) != 0 {
+ methods = append(methods, "basicAuth")
+ }
+
+ if len(authInfo.ClientCertificate) != 0 || len(authInfo.ClientCertificateData) != 0 {
+ // Make sure cert data and file aren't both specified
+ if len(authInfo.ClientCertificate) != 0 && len(authInfo.ClientCertificateData) != 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("client-cert-data and client-cert are both specified for %v. client-cert-data will override.", authInfoName))
+ }
+ // Make sure key data and file aren't both specified
+ if len(authInfo.ClientKey) != 0 && len(authInfo.ClientKeyData) != 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("client-key-data and client-key are both specified for %v; client-key-data will override", authInfoName))
+ }
+ // Make sure a key is specified
+ if len(authInfo.ClientKey) == 0 && len(authInfo.ClientKeyData) == 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("client-key-data or client-key must be specified for %v to use the clientCert authentication method.", authInfoName))
+ }
+
+ if len(authInfo.ClientCertificate) != 0 {
+ clientCertFile, err := os.Open(authInfo.ClientCertificate)
+ defer clientCertFile.Close()
+ if err != nil {
+ validationErrors = append(validationErrors, fmt.Errorf("unable to read client-cert %v for %v due to %v", authInfo.ClientCertificate, authInfoName, err))
+ }
+ }
+ if len(authInfo.ClientKey) != 0 {
+ clientKeyFile, err := os.Open(authInfo.ClientKey)
+ defer clientKeyFile.Close()
+ if err != nil {
+ validationErrors = append(validationErrors, fmt.Errorf("unable to read client-key %v for %v due to %v", authInfo.ClientKey, authInfoName, err))
+ }
+ }
+ }
+
+ // authPath also provides information for the client to identify the server, so allow multiple auth methods in that case
+ if (len(methods) > 1) && (!usingAuthPath) {
+ validationErrors = append(validationErrors, fmt.Errorf("more than one authentication method found for %v; found %v, only one is allowed", authInfoName, methods))
+ }
+
+ return validationErrors
+}
+
+// validateContext looks for errors in the context. It is not transitive, so errors in the reference authInfo or cluster configs are not included in this return
+func validateContext(contextName string, context clientcmdapi.Context, config clientcmdapi.Config) []error {
+ validationErrors := make([]error, 0)
+
+ if len(context.AuthInfo) == 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("user was not specified for context %q", contextName))
+ } else if _, exists := config.AuthInfos[context.AuthInfo]; !exists {
+ validationErrors = append(validationErrors, fmt.Errorf("user %q was not found for context %q", context.AuthInfo, contextName))
+ }
+
+ if len(context.Cluster) == 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("cluster was not specified for context %q", contextName))
+ } else if _, exists := config.Clusters[context.Cluster]; !exists {
+ validationErrors = append(validationErrors, fmt.Errorf("cluster %q was not found for context %q", context.Cluster, contextName))
+ }
+
+ if len(context.Namespace) != 0 {
+ if len(validation.IsDNS1123Label(context.Namespace)) != 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("namespace %q for context %q does not conform to the kubernetes DNS_LABEL rules", context.Namespace, contextName))
+ }
+ }
+
+ return validationErrors
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterrolebindings.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterrolebindings.go
new file mode 100644
index 0000000..fa9cad9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterrolebindings.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ClusterRoleBindings has methods to work with ClusterRoleBinding resources in a namespace
+type ClusterRoleBindings interface {
+ ClusterRoleBindings() ClusterRoleBindingInterface
+}
+
+// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
+type ClusterRoleBindingInterface interface {
+ List(opts api.ListOptions) (*rbac.ClusterRoleBindingList, error)
+ Get(name string) (*rbac.ClusterRoleBinding, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)
+ Update(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// clusterRoleBindings implements ClusterRoleBindingsNamespacer interface
+type clusterRoleBindings struct {
+ client *RbacClient
+}
+
+// newClusterRoleBindings returns a clusterRoleBindings
+func newClusterRoleBindings(c *RbacClient) *clusterRoleBindings {
+ return &clusterRoleBindings{
+ client: c,
+ }
+}
+
+// List takes label and field selectors, and returns the list of clusterRoleBindings that match those selectors.
+func (c *clusterRoleBindings) List(opts api.ListOptions) (result *rbac.ClusterRoleBindingList, err error) {
+ result = &rbac.ClusterRoleBindingList{}
+ err = c.client.Get().Resource("clusterrolebindings").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the clusterRoleBinding, and returns the corresponding ClusterRoleBinding object, and an error if it occurs
+func (c *clusterRoleBindings) Get(name string) (result *rbac.ClusterRoleBinding, err error) {
+ result = &rbac.ClusterRoleBinding{}
+ err = c.client.Get().Resource("clusterrolebindings").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
+func (c *clusterRoleBindings) Delete(name string, options *api.DeleteOptions) error {
+ return c.client.Delete().Resource("clusterrolebindings").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if it occurs.
+func (c *clusterRoleBindings) Create(clusterRoleBinding *rbac.ClusterRoleBinding) (result *rbac.ClusterRoleBinding, err error) {
+ result = &rbac.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 it occurs.
+func (c *clusterRoleBindings) Update(clusterRoleBinding *rbac.ClusterRoleBinding) (result *rbac.ClusterRoleBinding, err error) {
+ result = &rbac.ClusterRoleBinding{}
+ err = c.client.Put().Resource("clusterrolebindings").Name(clusterRoleBinding.Name).Body(clusterRoleBinding).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
+func (c *clusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterroles.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterroles.go
new file mode 100644
index 0000000..165271a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/clusterroles.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ClusterRoles has methods to work with ClusterRole resources in a namespace
+type ClusterRoles interface {
+ ClusterRoles() ClusterRoleInterface
+}
+
+// ClusterRoleInterface has methods to work with ClusterRole resources.
+type ClusterRoleInterface interface {
+ List(opts api.ListOptions) (*rbac.ClusterRoleList, error)
+ Get(name string) (*rbac.ClusterRole, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(clusterRole *rbac.ClusterRole) (*rbac.ClusterRole, error)
+ Update(clusterRole *rbac.ClusterRole) (*rbac.ClusterRole, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// clusterRoles implements ClusterRolesNamespacer interface
+type clusterRoles struct {
+ client *RbacClient
+}
+
+// newClusterRoles returns a clusterRoles
+func newClusterRoles(c *RbacClient) *clusterRoles {
+ return &clusterRoles{
+ client: c,
+ }
+}
+
+// List takes label and field selectors, and returns the list of clusterRoles that match those selectors.
+func (c *clusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleList, err error) {
+ result = &rbac.ClusterRoleList{}
+ err = c.client.Get().Resource("clusterroles").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the clusterRole, and returns the corresponding ClusterRole object, and an error if it occurs
+func (c *clusterRoles) Get(name string) (result *rbac.ClusterRole, err error) {
+ result = &rbac.ClusterRole{}
+ err = c.client.Get().Resource("clusterroles").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the clusterRole and deletes it. Returns an error if one occurs.
+func (c *clusterRoles) Delete(name string, options *api.DeleteOptions) error {
+ return c.client.Delete().Resource("clusterroles").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if it occurs.
+func (c *clusterRoles) Create(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) {
+ result = &rbac.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 it occurs.
+func (c *clusterRoles) Update(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) {
+ result = &rbac.ClusterRole{}
+ err = c.client.Put().Resource("clusterroles").Name(clusterRole.Name).Body(clusterRole).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoles.
+func (c *clusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Resource("clusterroles").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/componentstatuses.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/componentstatuses.go
new file mode 100644
index 0000000..aca996b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/componentstatuses.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+)
+
+type ComponentStatusesInterface interface {
+ ComponentStatuses() ComponentStatusInterface
+}
+
+// ComponentStatusInterface contains methods to retrieve ComponentStatus
+type ComponentStatusInterface interface {
+ List(opts api.ListOptions) (*api.ComponentStatusList, error)
+ Get(name string) (*api.ComponentStatus, error)
+
+ // TODO: It'd be nice to have watch support at some point
+ //Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// componentStatuses implements ComponentStatusesInterface
+type componentStatuses struct {
+ client *Client
+}
+
+func newComponentStatuses(c *Client) *componentStatuses {
+ return &componentStatuses{c}
+}
+
+func (c *componentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) {
+ result = &api.ComponentStatusList{}
+ err = c.client.Get().
+ Resource("componentStatuses").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *componentStatuses) Get(name string) (result *api.ComponentStatus, err error) {
+ result = &api.ComponentStatus{}
+ err = c.client.Get().Resource("componentStatuses").Name(name).Do().Into(result)
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/conditions.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/conditions.go
new file mode 100644
index 0000000..5c28429
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/conditions.go
@@ -0,0 +1,240 @@
+/*
+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 unversioned
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/errors"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/util/wait"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ControllerHasDesiredReplicas returns a condition that will be true if and only if
+// the desired replica count for a controller's ReplicaSelector equals the Replicas count.
+func ControllerHasDesiredReplicas(c Interface, controller *api.ReplicationController) wait.ConditionFunc {
+
+ // If we're given a controller where the status lags the spec, it either means that the controller is stale,
+ // or that the rc manager hasn't noticed the update yet. Polling status.Replicas is not safe in the latter case.
+ desiredGeneration := controller.Generation
+
+ return func() (bool, error) {
+ ctrl, err := c.ReplicationControllers(controller.Namespace).Get(controller.Name)
+ if err != nil {
+ return false, err
+ }
+ // There's a chance a concurrent update modifies the Spec.Replicas causing this check to pass,
+ // or, after this check has passed, a modification causes the rc manager to create more pods.
+ // This will not be an issue once we've implemented graceful delete for rcs, but till then
+ // concurrent stop operations on the same rc might have unintended side effects.
+ return ctrl.Status.ObservedGeneration >= desiredGeneration && ctrl.Status.Replicas == ctrl.Spec.Replicas, nil
+ }
+}
+
+// ReplicaSetHasDesiredReplicas returns a condition that will be true if and only if
+// the desired replica count for a ReplicaSet's ReplicaSelector equals the Replicas count.
+func ReplicaSetHasDesiredReplicas(c ExtensionsInterface, replicaSet *extensions.ReplicaSet) wait.ConditionFunc {
+
+ // If we're given a ReplicaSet where the status lags the spec, it either means that the
+ // ReplicaSet is stale, or that the ReplicaSet manager hasn't noticed the update yet.
+ // Polling status.Replicas is not safe in the latter case.
+ desiredGeneration := replicaSet.Generation
+
+ return func() (bool, error) {
+ rs, err := c.ReplicaSets(replicaSet.Namespace).Get(replicaSet.Name)
+ if err != nil {
+ return false, err
+ }
+ // There's a chance a concurrent update modifies the Spec.Replicas causing this check to
+ // pass, or, after this check has passed, a modification causes the ReplicaSet manager to
+ // create more pods. This will not be an issue once we've implemented graceful delete for
+ // ReplicaSets, but till then concurrent stop operations on the same ReplicaSet might have
+ // unintended side effects.
+ return rs.Status.ObservedGeneration >= desiredGeneration && rs.Status.Replicas == rs.Spec.Replicas, nil
+ }
+}
+
+// JobHasDesiredParallelism returns a condition that will be true if the desired parallelism count
+// for a job equals the current active counts or is less by an appropriate successful/unsuccessful count.
+func JobHasDesiredParallelism(c BatchInterface, job *batch.Job) wait.ConditionFunc {
+
+ return func() (bool, error) {
+ job, err := c.Jobs(job.Namespace).Get(job.Name)
+ if err != nil {
+ return false, err
+ }
+
+ // desired parallelism can be either the exact number, in which case return immediately
+ if job.Status.Active == *job.Spec.Parallelism {
+ return true, nil
+ }
+ if job.Spec.Completions == nil {
+ // A job without specified completions needs to wait for Active to reach Parallelism.
+ return false, nil
+ } else {
+ // otherwise count successful
+ progress := *job.Spec.Completions - job.Status.Active - job.Status.Succeeded
+ return progress == 0, nil
+ }
+ }
+}
+
+// DeploymentHasDesiredReplicas returns a condition that will be true if and only if
+// the desired replica count for a deployment equals its updated replicas count.
+// (non-terminated pods that have the desired template spec).
+func DeploymentHasDesiredReplicas(c ExtensionsInterface, deployment *extensions.Deployment) wait.ConditionFunc {
+ // If we're given a deployment where the status lags the spec, it either
+ // means that the deployment is stale, or that the deployment manager hasn't
+ // noticed the update yet. Polling status.Replicas is not safe in the latter
+ // case.
+ desiredGeneration := deployment.Generation
+
+ return func() (bool, error) {
+ deployment, err := c.Deployments(deployment.Namespace).Get(deployment.Name)
+ if err != nil {
+ return false, err
+ }
+ return deployment.Status.ObservedGeneration >= desiredGeneration &&
+ deployment.Status.UpdatedReplicas == deployment.Spec.Replicas, nil
+ }
+}
+
+// ErrPodCompleted is returned by PodRunning or PodContainerRunning to indicate that
+// the pod has already reached completed state.
+var ErrPodCompleted = fmt.Errorf("pod ran to completion")
+
+// PodRunning returns true if the pod is running, false if the pod has not yet reached running state,
+// returns ErrPodCompleted if the pod has run to completion, or an error in any other case.
+func PodRunning(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, errors.NewNotFound(unversioned.GroupResource{Resource: "pods"}, "")
+ }
+ switch t := event.Object.(type) {
+ case *api.Pod:
+ switch t.Status.Phase {
+ case api.PodRunning:
+ return true, nil
+ case api.PodFailed, api.PodSucceeded:
+ return false, ErrPodCompleted
+ }
+ }
+ return false, nil
+}
+
+// PodCompleted returns true if the pod has run to completion, false if the pod has not yet
+// reached running state, or an error in any other case.
+func PodCompleted(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, errors.NewNotFound(unversioned.GroupResource{Resource: "pods"}, "")
+ }
+ switch t := event.Object.(type) {
+ case *api.Pod:
+ switch t.Status.Phase {
+ case api.PodFailed, api.PodSucceeded:
+ return true, nil
+ }
+ }
+ return false, nil
+}
+
+// PodRunningAndReady returns true if the pod is running and ready, false if the pod has not
+// yet reached those states, returns ErrPodCompleted if the pod has run to completion, or
+// an error in any other case.
+func PodRunningAndReady(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, errors.NewNotFound(unversioned.GroupResource{Resource: "pods"}, "")
+ }
+ switch t := event.Object.(type) {
+ case *api.Pod:
+ switch t.Status.Phase {
+ case api.PodFailed, api.PodSucceeded:
+ return false, ErrPodCompleted
+ case api.PodRunning:
+ return api.IsPodReady(t), nil
+ }
+ }
+ return false, nil
+}
+
+// PodNotPending returns true if the pod has left the pending state, false if it has not,
+// or an error in any other case (such as if the pod was deleted).
+func PodNotPending(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, errors.NewNotFound(unversioned.GroupResource{Resource: "pods"}, "")
+ }
+ switch t := event.Object.(type) {
+ case *api.Pod:
+ switch t.Status.Phase {
+ case api.PodPending:
+ return false, nil
+ default:
+ return true, nil
+ }
+ }
+ return false, nil
+}
+
+// PodContainerRunning returns false until the named container has ContainerStatus running (at least once),
+// and will return an error if the pod is deleted, runs to completion, or the container pod is not available.
+func PodContainerRunning(containerName string) watch.ConditionFunc {
+ return func(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, errors.NewNotFound(unversioned.GroupResource{Resource: "pods"}, "")
+ }
+ switch t := event.Object.(type) {
+ case *api.Pod:
+ switch t.Status.Phase {
+ case api.PodRunning, api.PodPending:
+ case api.PodFailed, api.PodSucceeded:
+ return false, ErrPodCompleted
+ default:
+ return false, nil
+ }
+ for _, s := range t.Status.ContainerStatuses {
+ if s.Name != containerName {
+ continue
+ }
+ return s.State.Running != nil, nil
+ }
+ return false, nil
+ }
+ return false, nil
+ }
+}
+
+// ServiceAccountHasSecrets returns true if the service account has at least one secret,
+// false if it does not, or an error.
+func ServiceAccountHasSecrets(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, errors.NewNotFound(unversioned.GroupResource{Resource: "serviceaccounts"}, "")
+ }
+ switch t := event.Object.(type) {
+ case *api.ServiceAccount:
+ return len(t.Secrets) > 0, nil
+ }
+ return false, nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/configmap.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/configmap.go
new file mode 100644
index 0000000..c2f2035
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/configmap.go
@@ -0,0 +1,122 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+const (
+ ConfigMapResourceName string = "configmaps"
+)
+
+type ConfigMapsNamespacer interface {
+ ConfigMaps(namespace string) ConfigMapsInterface
+}
+
+type ConfigMapsInterface interface {
+ Get(string) (*api.ConfigMap, error)
+ List(opts api.ListOptions) (*api.ConfigMapList, error)
+ Create(*api.ConfigMap) (*api.ConfigMap, error)
+ Delete(string) error
+ Update(*api.ConfigMap) (*api.ConfigMap, error)
+ Watch(api.ListOptions) (watch.Interface, error)
+}
+
+type ConfigMaps struct {
+ client *Client
+ namespace string
+}
+
+// ConfigMaps should implement ConfigMapsInterface
+var _ ConfigMapsInterface = &ConfigMaps{}
+
+func newConfigMaps(c *Client, ns string) *ConfigMaps {
+ return &ConfigMaps{
+ client: c,
+ namespace: ns,
+ }
+}
+
+func (c *ConfigMaps) Get(name string) (*api.ConfigMap, error) {
+ result := &api.ConfigMap{}
+ err := c.client.Get().
+ Namespace(c.namespace).
+ Resource(ConfigMapResourceName).
+ Name(name).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *ConfigMaps) List(opts api.ListOptions) (*api.ConfigMapList, error) {
+ result := &api.ConfigMapList{}
+ err := c.client.Get().
+ Namespace(c.namespace).
+ Resource(ConfigMapResourceName).
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *ConfigMaps) Create(cfg *api.ConfigMap) (*api.ConfigMap, error) {
+ result := &api.ConfigMap{}
+ err := c.client.Post().
+ Namespace(c.namespace).
+ Resource(ConfigMapResourceName).
+ Body(cfg).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *ConfigMaps) Delete(name string) error {
+ return c.client.Delete().
+ Namespace(c.namespace).
+ Resource(ConfigMapResourceName).
+ Name(name).
+ Do().
+ Error()
+}
+
+func (c *ConfigMaps) Update(cfg *api.ConfigMap) (*api.ConfigMap, error) {
+ result := &api.ConfigMap{}
+
+ err := c.client.Put().
+ Namespace(c.namespace).
+ Resource(ConfigMapResourceName).
+ Name(cfg.Name).
+ Body(cfg).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *ConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.namespace).
+ Resource(ConfigMapResourceName).
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/containerinfo.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/containerinfo.go
new file mode 100644
index 0000000..2f9aae8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/containerinfo.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 unversioned
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "strconv"
+
+ cadvisorapi "github.com/google/cadvisor/info/v1"
+)
+
+type ContainerInfoGetter interface {
+ // GetContainerInfo returns information about a container.
+ GetContainerInfo(host, podID, containerID string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
+ // GetRootInfo returns information about the root container on a machine.
+ GetRootInfo(host string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
+ // GetMachineInfo returns the machine's information like number of cores, memory capacity.
+ GetMachineInfo(host string) (*cadvisorapi.MachineInfo, error)
+}
+
+type HTTPContainerInfoGetter struct {
+ Client *http.Client
+ Port int
+}
+
+func (self *HTTPContainerInfoGetter) GetMachineInfo(host string) (*cadvisorapi.MachineInfo, error) {
+ request, err := http.NewRequest(
+ "GET",
+ fmt.Sprintf("http://%v/spec",
+ net.JoinHostPort(host, strconv.Itoa(self.Port)),
+ ),
+ nil,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ response, err := self.Client.Do(request)
+ if err != nil {
+ return nil, err
+ }
+ defer response.Body.Close()
+ if response.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("trying to get machine spec from %v; received status %v",
+ host, response.Status)
+ }
+ var minfo cadvisorapi.MachineInfo
+ err = json.NewDecoder(response.Body).Decode(&minfo)
+ if err != nil {
+ return nil, err
+ }
+ return &minfo, nil
+}
+
+func (self *HTTPContainerInfoGetter) getContainerInfo(host, path string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
+ var body io.Reader
+ if req != nil {
+ content, err := json.Marshal(req)
+ if err != nil {
+ return nil, err
+ }
+ body = bytes.NewBuffer(content)
+ }
+
+ request, err := http.NewRequest(
+ "GET",
+ fmt.Sprintf("http://%v/stats/%v",
+ net.JoinHostPort(host, strconv.Itoa(self.Port)),
+ path,
+ ),
+ body,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ response, err := self.Client.Do(request)
+ if err != nil {
+ return nil, err
+ }
+ defer response.Body.Close()
+ if response.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("trying to get info for %v from %v; received status %v",
+ path, host, response.Status)
+ }
+ var cinfo cadvisorapi.ContainerInfo
+ err = json.NewDecoder(response.Body).Decode(&cinfo)
+ if err != nil {
+ return nil, err
+ }
+ return &cinfo, nil
+}
+
+func (self *HTTPContainerInfoGetter) GetContainerInfo(host, podID, containerID string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
+ return self.getContainerInfo(
+ host,
+ fmt.Sprintf("%v/%v", podID, containerID),
+ req,
+ )
+}
+
+func (self *HTTPContainerInfoGetter) GetRootInfo(host string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) {
+ return self.getContainerInfo(host, "", req)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/daemon_sets.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/daemon_sets.go
new file mode 100644
index 0000000..7ec9182
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/daemon_sets.go
@@ -0,0 +1,100 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// DaemonsSetsNamespacer has methods to work with DaemonSet resources in a namespace
+type DaemonSetsNamespacer interface {
+ DaemonSets(namespace string) DaemonSetInterface
+}
+
+type DaemonSetInterface interface {
+ List(opts api.ListOptions) (*extensions.DaemonSetList, error)
+ Get(name string) (*extensions.DaemonSet, error)
+ Create(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
+ Update(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
+ UpdateStatus(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
+ Delete(name string) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// daemonSets implements DaemonsSetsNamespacer interface
+type daemonSets struct {
+ r *ExtensionsClient
+ ns string
+}
+
+func newDaemonSets(c *ExtensionsClient, namespace string) *daemonSets {
+ return &daemonSets{c, namespace}
+}
+
+// Ensure statically that daemonSets implements DaemonSetsInterface.
+var _ DaemonSetInterface = &daemonSets{}
+
+func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) {
+ result = &extensions.DaemonSetList{}
+ err = c.r.Get().Namespace(c.ns).Resource("daemonsets").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular daemon set.
+func (c *daemonSets) Get(name string) (result *extensions.DaemonSet, err error) {
+ result = &extensions.DaemonSet{}
+ err = c.r.Get().Namespace(c.ns).Resource("daemonsets").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new daemon set.
+func (c *daemonSets) Create(daemon *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
+ result = &extensions.DaemonSet{}
+ err = c.r.Post().Namespace(c.ns).Resource("daemonsets").Body(daemon).Do().Into(result)
+ return
+}
+
+// Update updates an existing daemon set.
+func (c *daemonSets) Update(daemon *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
+ result = &extensions.DaemonSet{}
+ err = c.r.Put().Namespace(c.ns).Resource("daemonsets").Name(daemon.Name).Body(daemon).Do().Into(result)
+ return
+}
+
+// UpdateStatus updates an existing daemon set status
+func (c *daemonSets) UpdateStatus(daemon *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
+ result = &extensions.DaemonSet{}
+ err = c.r.Put().Namespace(c.ns).Resource("daemonsets").Name(daemon.Name).SubResource("status").Body(daemon).Do().Into(result)
+ return
+}
+
+// Delete deletes an existing daemon set.
+func (c *daemonSets) Delete(name string) error {
+ return c.r.Delete().Namespace(c.ns).Resource("daemonsets").Name(name).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested daemon sets.
+func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/deployment.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/deployment.go
new file mode 100644
index 0000000..a5e8afe
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/deployment.go
@@ -0,0 +1,111 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// DeploymentsNamespacer has methods to work with Deployment resources in a namespace
+type DeploymentsNamespacer interface {
+ Deployments(namespace string) DeploymentInterface
+}
+
+// DeploymentInterface has methods to work with Deployment resources.
+type DeploymentInterface interface {
+ List(opts api.ListOptions) (*extensions.DeploymentList, error)
+ Get(name string) (*extensions.Deployment, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(*extensions.Deployment) (*extensions.Deployment, error)
+ Update(*extensions.Deployment) (*extensions.Deployment, error)
+ UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ Rollback(*extensions.DeploymentRollback) error
+}
+
+// deployments implements DeploymentInterface
+type deployments struct {
+ client *ExtensionsClient
+ ns string
+}
+
+// Ensure statically that deployments implements DeploymentInterface.
+var _ DeploymentInterface = &deployments{}
+
+// newDeployments returns a Deployments
+func newDeployments(c *ExtensionsClient, namespace string) *deployments {
+ return &deployments{
+ client: c,
+ ns: namespace,
+ }
+}
+
+// List takes label and field selectors, and returns the list of Deployments that match those selectors.
+func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) {
+ result = &extensions.DeploymentList{}
+ err = c.client.Get().Namespace(c.ns).Resource("deployments").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// 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) (result *extensions.Deployment, err error) {
+ result = &extensions.Deployment{}
+ err = c.client.Get().Namespace(c.ns).Resource("deployments").Name(name).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 *api.DeleteOptions) error {
+ return c.client.Delete().Namespace(c.ns).Resource("deployments").Name(name).Body(options).Do().Error()
+}
+
+// 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 *extensions.Deployment) (result *extensions.Deployment, err error) {
+ result = &extensions.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 *extensions.Deployment) (result *extensions.Deployment, err error) {
+ result = &extensions.Deployment{}
+ err = c.client.Put().Namespace(c.ns).Resource("deployments").Name(deployment.Name).Body(deployment).Do().Into(result)
+ return
+}
+
+func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
+ result = &extensions.Deployment{}
+ err = c.client.Put().Namespace(c.ns).Resource("deployments").Name(deployment.Name).SubResource("status").Body(deployment).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested deployments.
+func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// Rollback applied the provided DeploymentRollback to the named deployment in the current namespace.
+func (c *deployments) Rollback(deploymentRollback *extensions.DeploymentRollback) error {
+ return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/doc.go
new file mode 100644
index 0000000..dac3925
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/doc.go
@@ -0,0 +1,57 @@
+/*
+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 unversioned contains the implementation of the client side communication with the
+Kubernetes master. The Client class provides methods for reading, creating, updating,
+and deleting pods, replication controllers, daemons, services, and nodes.
+
+Most consumers should use the Config object to create a Client:
+
+ import (
+ client "k8s.io/kubernetes/pkg/client/unversioned"
+ "k8s.io/kubernetes/pkg/api"
+ )
+
+ [...]
+
+ config := &client.Config{
+ Host: "http://localhost:8080",
+ Username: "test",
+ Password: "password",
+ }
+ client, err := client.New(config)
+ if err != nil {
+ // handle error
+ }
+ pods, err := client.Pods(api.NamespaceDefault).List(api.ListOptions{})
+ if err != nil {
+ // handle error
+ }
+
+More advanced consumers may wish to provide their own transport via a http.RoundTripper:
+
+ config := &client.Config{
+ Host: "https://localhost:8080",
+ Transport: oauthclient.Transport(),
+ }
+ client, err := client.New(config)
+
+The RESTClient type implements the Kubernetes API conventions (see `docs/devel/api-conventions.md`)
+for a given API path and is intended for use by consumers implementing their own Kubernetes
+compatible APIs.
+*/
+package unversioned
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/endpoints.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/endpoints.go
new file mode 100644
index 0000000..6e20a34
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/endpoints.go
@@ -0,0 +1,101 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// EndpointsNamespacer has methods to work with Endpoints resources in a namespace
+type EndpointsNamespacer interface {
+ Endpoints(namespace string) EndpointsInterface
+}
+
+// EndpointsInterface has methods to work with Endpoints resources
+type EndpointsInterface interface {
+ Create(endpoints *api.Endpoints) (*api.Endpoints, error)
+ List(opts api.ListOptions) (*api.EndpointsList, error)
+ Get(name string) (*api.Endpoints, error)
+ Delete(name string) error
+ Update(endpoints *api.Endpoints) (*api.Endpoints, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// endpoints implements EndpointsInterface
+type endpoints struct {
+ r *Client
+ ns string
+}
+
+// newEndpoints returns a endpoints
+func newEndpoints(c *Client, namespace string) *endpoints {
+ return &endpoints{c, namespace}
+}
+
+// Create creates a new endpoint.
+func (c *endpoints) Create(endpoints *api.Endpoints) (*api.Endpoints, error) {
+ result := &api.Endpoints{}
+ err := c.r.Post().Namespace(c.ns).Resource("endpoints").Body(endpoints).Do().Into(result)
+ return result, err
+}
+
+// List takes a selector, and returns the list of endpoints that match that selector
+func (c *endpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) {
+ result = &api.EndpointsList{}
+ err = c.r.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Get returns information about the endpoints for a particular service.
+func (c *endpoints) Get(name string) (result *api.Endpoints, err error) {
+ result = &api.Endpoints{}
+ err = c.r.Get().Namespace(c.ns).Resource("endpoints").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the endpoint, and returns an error if one occurs
+func (c *endpoints) Delete(name string) error {
+ return c.r.Delete().Namespace(c.ns).Resource("endpoints").Name(name).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested endpoints for a service.
+func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+func (c *endpoints) Update(endpoints *api.Endpoints) (*api.Endpoints, error) {
+ result := &api.Endpoints{}
+ err := c.r.Put().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(endpoints.Name).
+ Body(endpoints).
+ Do().
+ Into(result)
+ return result, err
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/events.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/events.go
new file mode 100644
index 0000000..3421bd8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/events.go
@@ -0,0 +1,219 @@
+/*
+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 unversioned
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/fields"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// EventNamespacer can return an EventInterface for the given namespace.
+type EventNamespacer interface {
+ Events(namespace string) EventInterface
+}
+
+// EventInterface has methods to work with Event resources
+type EventInterface interface {
+ Create(event *api.Event) (*api.Event, error)
+ Update(event *api.Event) (*api.Event, error)
+ Patch(event *api.Event, data []byte) (*api.Event, error)
+ List(opts api.ListOptions) (*api.EventList, error)
+ Get(name string) (*api.Event, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ // Search finds events about the specified object
+ Search(objOrRef runtime.Object) (*api.EventList, error)
+ Delete(name string) error
+ // DeleteCollection deletes a collection of events.
+ DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) 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
+}
+
+// events implements Events interface
+type events struct {
+ client *Client
+ namespace string
+}
+
+// newEvents returns a new events object.
+func newEvents(c *Client, ns string) *events {
+ return &events{
+ client: c,
+ namespace: ns,
+ }
+}
+
+// Create 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) Create(event *api.Event) (*api.Event, error) {
+ if e.namespace != "" && event.Namespace != e.namespace {
+ return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.namespace)
+ }
+ result := &api.Event{}
+ err := e.client.Post().
+ Namespace(event.Namespace).
+ Resource("events").
+ Body(event).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// Update 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) Update(event *api.Event) (*api.Event, error) {
+ result := &api.Event{}
+ err := e.client.Put().
+ Namespace(event.Namespace).
+ Resource("events").
+ Name(event.Name).
+ Body(event).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// Patch 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) Patch(incompleteEvent *api.Event, data []byte) (*api.Event, error) {
+ result := &api.Event{}
+ err := e.client.Patch(api.StrategicMergePatchType).
+ Namespace(incompleteEvent.Namespace).
+ Resource("events").
+ Name(incompleteEvent.Name).
+ Body(data).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// List returns a list of events matching the selectors.
+func (e *events) List(opts api.ListOptions) (*api.EventList, error) {
+ result := &api.EventList{}
+ err := e.client.Get().
+ Namespace(e.namespace).
+ Resource("events").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// Get returns the given event, or an error.
+func (e *events) Get(name string) (*api.Event, error) {
+ result := &api.Event{}
+ err := e.client.Get().
+ Namespace(e.namespace).
+ Resource("events").
+ Name(name).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// Watch starts watching for events matching the given selectors.
+func (e *events) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return e.client.Get().
+ Prefix("watch").
+ Namespace(e.namespace).
+ Resource("events").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// 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(objOrRef runtime.Object) (*api.EventList, error) {
+ ref, err := api.GetReference(objOrRef)
+ if err != nil {
+ return nil, err
+ }
+ if e.namespace != "" && ref.Namespace != e.namespace {
+ return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.namespace)
+ }
+ 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(api.ListOptions{FieldSelector: fieldSelector})
+}
+
+// Delete deletes an existing event.
+func (e *events) Delete(name string) error {
+ return e.client.Delete().
+ Namespace(e.namespace).
+ Resource("events").
+ Name(name).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (e *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
+ return e.client.Delete().
+ Namespace(e.namespace).
+ Resource("events").
+ VersionedParams(&listOptions, api.ParameterCodec).
+ Body(options).
+ Do().
+ 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.
+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"
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/extensions.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/extensions.go
new file mode 100644
index 0000000..39b3408
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/extensions.go
@@ -0,0 +1,131 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+// Interface holds the experimental methods for clients of Kubernetes
+// to allow mock testing.
+// Features of Extensions group are not supported and may be changed or removed in
+// incompatible ways at any time.
+type ExtensionsInterface interface {
+ ScaleNamespacer
+ DaemonSetsNamespacer
+ DeploymentsNamespacer
+ JobsNamespacer
+ IngressNamespacer
+ NetworkPolicyNamespacer
+ ThirdPartyResourceNamespacer
+ ReplicaSetsNamespacer
+ PodSecurityPoliciesInterface
+}
+
+// ExtensionsClient is used to interact with experimental Kubernetes features.
+// Features of Extensions group are not supported and may be changed or removed in
+// incompatible ways at any time.
+type ExtensionsClient struct {
+ *restclient.RESTClient
+}
+
+func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface {
+ return newPodSecurityPolicy(c)
+}
+
+func (c *ExtensionsClient) Scales(namespace string) ScaleInterface {
+ return newScales(c, namespace)
+}
+
+func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface {
+ return newDaemonSets(c, namespace)
+}
+
+func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface {
+ return newDeployments(c, namespace)
+}
+
+func (c *ExtensionsClient) Jobs(namespace string) JobInterface {
+ return newJobs(c, namespace)
+}
+
+func (c *ExtensionsClient) Ingress(namespace string) IngressInterface {
+ return newIngress(c, namespace)
+}
+
+func (c *ExtensionsClient) NetworkPolicies(namespace string) NetworkPolicyInterface {
+ return newNetworkPolicies(c, namespace)
+}
+
+func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface {
+ return newThirdPartyResources(c)
+}
+
+func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
+ return newReplicaSets(c, namespace)
+}
+
+// NewExtensions creates a new ExtensionsClient for the given config. This client
+// provides access to experimental Kubernetes features.
+// Features of Extensions group are not supported and may be changed or removed in
+// incompatible ways at any time.
+func NewExtensions(c *restclient.Config) (*ExtensionsClient, error) {
+ config := *c
+ if err := setExtensionsDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &ExtensionsClient{client}, nil
+}
+
+// NewExtensionsOrDie creates a new ExtensionsClient for the given config and
+// panics if there is an error in the config.
+// Features of Extensions group are not supported and may be changed or removed in
+// incompatible ways at any time.
+func NewExtensionsOrDie(c *restclient.Config) *ExtensionsClient {
+ client, err := NewExtensions(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setExtensionsDefaults(config *restclient.Config) error {
+ // if experimental group is not registered, return an error
+ g, err := registered.Group(extensions.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/flags.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/flags.go
new file mode 100644
index 0000000..7d32a25
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/flags.go
@@ -0,0 +1,31 @@
+/*
+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 unversioned
+
+import (
+ "time"
+)
+
+// FlagSet abstracts the flag interface for compatibility with both Golang "flag"
+// and cobra pflags (Posix style).
+type FlagSet interface {
+ StringVar(p *string, name, value, usage string)
+ BoolVar(p *bool, name string, value bool, usage string)
+ UintVar(p *uint, name string, value uint, usage string)
+ DurationVar(p *time.Duration, name string, value time.Duration, usage string)
+ IntVar(p *int, name string, value int, usage string)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go
new file mode 100644
index 0000000..8475769
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.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 unversioned
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/certificates"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/apis/policy"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/client/typed/discovery"
+ "k8s.io/kubernetes/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/version"
+ // Import solely to initialize client auth plugins.
+ _ "k8s.io/kubernetes/plugin/pkg/client/auth"
+)
+
+const (
+ legacyAPIPath = "/api"
+ defaultAPIPath = "/apis"
+)
+
+// New creates a Kubernetes client for the given config. This client works with pods,
+// replication controllers, daemons, and services. It allows operations such as list, get, update
+// and delete on these objects. An error is returned if the provided configuration
+// is not valid.
+func New(c *restclient.Config) (*Client, error) {
+ config := *c
+ if err := SetKubernetesDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+
+ discoveryConfig := *c
+ discoveryClient, err := discovery.NewDiscoveryClientForConfig(&discoveryConfig)
+ if err != nil {
+ return nil, err
+ }
+
+ var autoscalingClient *AutoscalingClient
+ if registered.IsRegistered(autoscaling.GroupName) {
+ autoscalingConfig := *c
+ autoscalingClient, err = NewAutoscaling(&autoscalingConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ var batchClient *BatchClient
+ if registered.IsRegistered(batch.GroupName) {
+ batchConfig := *c
+ batchClient, err = NewBatch(&batchConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ var extensionsClient *ExtensionsClient
+ if registered.IsRegistered(extensions.GroupName) {
+ extensionsConfig := *c
+ extensionsClient, err = NewExtensions(&extensionsConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+ var policyClient *PolicyClient
+ if registered.IsRegistered(policy.GroupName) {
+ policyConfig := *c
+ policyClient, err = NewPolicy(&policyConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+ var certsClient *CertificatesClient
+ if registered.IsRegistered(certificates.GroupName) {
+ certsConfig := *c
+ certsClient, err = NewCertificates(&certsConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ var appsClient *AppsClient
+ if registered.IsRegistered(apps.GroupName) {
+ appsConfig := *c
+ appsClient, err = NewApps(&appsConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ var rbacClient *RbacClient
+ if registered.IsRegistered(rbac.GroupName) {
+ rbacConfig := *c
+ rbacClient, err = NewRbac(&rbacConfig)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return &Client{RESTClient: client, AutoscalingClient: autoscalingClient, BatchClient: batchClient, CertificatesClient: certsClient, ExtensionsClient: extensionsClient, DiscoveryClient: discoveryClient, AppsClient: appsClient, PolicyClient: policyClient, RbacClient: rbacClient}, nil
+}
+
+// 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(client *Client, c *restclient.Config) error {
+ var err error
+ if client == nil {
+ client, err = New(c)
+ if err != nil {
+ return err
+ }
+ }
+ cVer := version.Get()
+ sVer, err := client.Discovery().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 cVer.GitVersion != sVer.GitVersion || cVer.GitCommit != sVer.GitCommit || cVer.GitTreeState != sVer.GitTreeState {
+ return fmt.Errorf("server version (%#v) differs from client version (%#v)!\n", sVer, cVer)
+ }
+
+ return nil
+}
+
+// NegotiateVersion queries the server's supported api versions to find
+// a version that both client and server support.
+// - If no version is provided, try registered client versions in order of
+// preference.
+// - If version is provided, but not default config (explicitly requested via
+// commandline flag), and is unsupported by the server, print a warning to
+// stderr and try client's registered versions in order of preference.
+// - If version is config default, and the server does not support it,
+// return an error.
+func NegotiateVersion(client *Client, c *restclient.Config, requestedGV *unversioned.GroupVersion, clientRegisteredGVs []unversioned.GroupVersion) (*unversioned.GroupVersion, error) {
+ var err error
+ if client == nil {
+ client, err = New(c)
+ if err != nil {
+ return nil, err
+ }
+ }
+ clientVersions := sets.String{}
+ for _, gv := range clientRegisteredGVs {
+ clientVersions.Insert(gv.String())
+ }
+ 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 nil, err
+ }
+ versions := unversioned.ExtractGroupVersions(groups)
+ serverVersions := sets.String{}
+ for _, v := range versions {
+ serverVersions.Insert(v)
+ }
+
+ // If no version requested, use config version (may also be empty).
+ // make a copy of the original so we don't risk mutating input here or in the returned value
+ var preferredGV *unversioned.GroupVersion
+ switch {
+ case requestedGV != nil:
+ t := *requestedGV
+ preferredGV = &t
+ case c.GroupVersion != nil:
+ t := *c.GroupVersion
+ preferredGV = &t
+ }
+
+ // If version explicitly requested verify that both client and server support it.
+ // If server does not support warn, but try to negotiate a lower version.
+ if preferredGV != nil {
+ if !clientVersions.Has(preferredGV.String()) {
+ return nil, fmt.Errorf("client does not support API version %q; client supported API versions: %v", preferredGV, clientVersions)
+
+ }
+ // If the server supports no versions, then we should just use the preferredGV
+ // This can happen because discovery fails due to 403 Forbidden errors
+ if len(serverVersions) == 0 {
+ return preferredGV, nil
+ }
+ if serverVersions.Has(preferredGV.String()) {
+ return preferredGV, nil
+ }
+ // If we are using an explicit config version the server does not support, fail.
+ if (c.GroupVersion != nil) && (*preferredGV == *c.GroupVersion) {
+ return nil, fmt.Errorf("server does not support API version %q", preferredGV)
+ }
+ }
+
+ for _, clientGV := range clientRegisteredGVs {
+ if serverVersions.Has(clientGV.String()) {
+ // Version was not explicitly requested in command config (--api-version).
+ // Ok to fall back to a supported version with a warning.
+ // TODO: caesarxuchao: enable the warning message when we have
+ // proper fix. Please refer to issue #14895.
+ // if len(version) != 0 {
+ // glog.Warningf("Server does not support API version '%s'. Falling back to '%s'.", version, clientVersion)
+ // }
+ t := clientGV
+ return &t, nil
+ }
+ }
+ return nil, fmt.Errorf("failed to negotiate an api version; server supports: %v, client supports: %v",
+ serverVersions, clientVersions)
+}
+
+// NewOrDie creates a Kubernetes client and panics if the provided API version is not recognized.
+func NewOrDie(c *restclient.Config) *Client {
+ client, err := New(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// NewInCluster is a shortcut for calling InClusterConfig() and then New().
+func NewInCluster() (*Client, error) {
+ cc, err := restclient.InClusterConfig()
+ if err != nil {
+ return nil, err
+ }
+ return New(cc)
+}
+
+// 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.
+// TODO: this method needs to be split into one that sets defaults per group, expected to be fix in PR "Refactoring clientcache.go and helper.go #14592"
+func SetKubernetesDefaults(config *restclient.Config) error {
+ if config.APIPath == "" {
+ config.APIPath = legacyAPIPath
+ }
+ g, err := registered.Group(api.GroupName)
+ if err != nil {
+ return err
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ if config.NegotiatedSerializer == nil {
+ config.NegotiatedSerializer = api.Codecs
+ }
+
+ return restclient.SetKubernetesDefaults(config)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/horizontalpodautoscaler.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/horizontalpodautoscaler.go
new file mode 100644
index 0000000..76c6a9c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/horizontalpodautoscaler.go
@@ -0,0 +1,103 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// HorizontalPodAutoscalersNamespacer has methods to work with HorizontalPodAutoscaler resources in a namespace
+type HorizontalPodAutoscalersNamespacer interface {
+ HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
+}
+
+// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
+type HorizontalPodAutoscalerInterface interface {
+ List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error)
+ Get(name string) (*autoscaling.HorizontalPodAutoscaler, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
+ Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
+ UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface using AutoscalingClient internally
+type horizontalPodAutoscalers struct {
+ client *AutoscalingClient
+ ns string
+}
+
+// newHorizontalPodAutoscalers returns a horizontalPodAutoscalers
+func newHorizontalPodAutoscalers(c *AutoscalingClient, namespace string) *horizontalPodAutoscalers {
+ return &horizontalPodAutoscalers{
+ client: c,
+ ns: namespace,
+ }
+}
+
+// List takes label and field selectors, and returns the list of horizontalPodAutoscalers that match those selectors.
+func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
+ result = &autoscaling.HorizontalPodAutoscalerList{}
+ err = c.client.Get().Namespace(c.ns).Resource("horizontalPodAutoscalers").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the horizontalPodAutoscaler, and returns the corresponding HorizontalPodAutoscaler object, and an error if it occurs
+func (c *horizontalPodAutoscalers) Get(name string) (result *autoscaling.HorizontalPodAutoscaler, err error) {
+ result = &autoscaling.HorizontalPodAutoscaler{}
+ err = c.client.Get().Namespace(c.ns).Resource("horizontalPodAutoscalers").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
+func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
+ return c.client.Delete().Namespace(c.ns).Resource("horizontalPodAutoscalers").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if it occurs.
+func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
+ result = &autoscaling.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 it occurs.
+func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
+ result = &autoscaling.HorizontalPodAutoscaler{}
+ err = c.client.Put().Namespace(c.ns).Resource("horizontalPodAutoscalers").Name(horizontalPodAutoscaler.Name).Body(horizontalPodAutoscaler).Do().Into(result)
+ return
+}
+
+// UpdateStatus takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if it occurs.
+func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
+ result = &autoscaling.HorizontalPodAutoscaler{}
+ err = c.client.Put().Namespace(c.ns).Resource("horizontalPodAutoscalers").Name(horizontalPodAutoscaler.Name).SubResource("status").Body(horizontalPodAutoscaler).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
+func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("horizontalPodAutoscalers").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/import_known_versions.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/import_known_versions.go
new file mode 100644
index 0000000..8508573
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/import_known_versions.go
@@ -0,0 +1,41 @@
+/*
+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
+
+// These imports are the API groups the client will support.
+import (
+ "fmt"
+
+ _ "k8s.io/kubernetes/pkg/api/install"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ _ "k8s.io/kubernetes/pkg/apis/apps/install"
+ _ "k8s.io/kubernetes/pkg/apis/authentication.k8s.io/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/componentconfig/install"
+ _ "k8s.io/kubernetes/pkg/apis/extensions/install"
+ _ "k8s.io/kubernetes/pkg/apis/policy/install"
+ _ "k8s.io/kubernetes/pkg/apis/rbac/install"
+)
+
+func init() {
+ if missingVersions := registered.ValidateEnvRequestedVersions(); len(missingVersions) != 0 {
+ panic(fmt.Sprintf("KUBE_API_VERSIONS contains versions that are not installed: %q.", missingVersions))
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/ingress.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/ingress.go
new file mode 100644
index 0000000..59c6a6d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/ingress.go
@@ -0,0 +1,100 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// IngressNamespacer has methods to work with Ingress resources in a namespace
+type IngressNamespacer interface {
+ Ingress(namespace string) IngressInterface
+}
+
+// IngressInterface exposes methods to work on Ingress resources.
+type IngressInterface interface {
+ List(opts api.ListOptions) (*extensions.IngressList, error)
+ Get(name string) (*extensions.Ingress, error)
+ Create(ingress *extensions.Ingress) (*extensions.Ingress, error)
+ Update(ingress *extensions.Ingress) (*extensions.Ingress, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error)
+}
+
+// ingress implements IngressNamespacer interface
+type ingress struct {
+ r *ExtensionsClient
+ ns string
+}
+
+// newIngress returns a ingress
+func newIngress(c *ExtensionsClient, namespace string) *ingress {
+ return &ingress{c, namespace}
+}
+
+// List returns a list of ingress that match the label and field selectors.
+func (c *ingress) List(opts api.ListOptions) (result *extensions.IngressList, err error) {
+ result = &extensions.IngressList{}
+ err = c.r.Get().Namespace(c.ns).Resource("ingresses").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular ingress.
+func (c *ingress) Get(name string) (result *extensions.Ingress, err error) {
+ result = &extensions.Ingress{}
+ err = c.r.Get().Namespace(c.ns).Resource("ingresses").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new ingress.
+func (c *ingress) Create(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
+ result = &extensions.Ingress{}
+ err = c.r.Post().Namespace(c.ns).Resource("ingresses").Body(ingress).Do().Into(result)
+ return
+}
+
+// Update updates an existing ingress.
+func (c *ingress) Update(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
+ result = &extensions.Ingress{}
+ err = c.r.Put().Namespace(c.ns).Resource("ingresses").Name(ingress.Name).Body(ingress).Do().Into(result)
+ return
+}
+
+// Delete deletes a ingress, returns error if one occurs.
+func (c *ingress) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("ingresses").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested ingress.
+func (c *ingress) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// UpdateStatus takes the name of the ingress and the new status. Returns the server's representation of the ingress, and an error, if it occurs.
+func (c *ingress) UpdateStatus(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
+ result = &extensions.Ingress{}
+ err = c.r.Put().Namespace(c.ns).Resource("ingresses").Name(ingress.Name).SubResource("status").Body(ingress).Do().Into(result)
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/jobs.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/jobs.go
new file mode 100644
index 0000000..14cfa3a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/jobs.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// JobsNamespacer has methods to work with Job resources in a namespace
+type JobsNamespacer interface {
+ Jobs(namespace string) JobInterface
+}
+
+// JobInterface exposes methods to work on Job resources.
+type JobInterface interface {
+ List(opts api.ListOptions) (*batch.JobList, error)
+ Get(name string) (*batch.Job, error)
+ Create(job *batch.Job) (*batch.Job, error)
+ Update(job *batch.Job) (*batch.Job, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ UpdateStatus(job *batch.Job) (*batch.Job, error)
+}
+
+// jobs implements JobsNamespacer interface
+type jobs struct {
+ r *ExtensionsClient
+ ns string
+}
+
+// newJobs returns a jobs
+func newJobs(c *ExtensionsClient, namespace string) *jobs {
+ return &jobs{c, namespace}
+}
+
+// Ensure statically that jobs implements JobInterface.
+var _ JobInterface = &jobs{}
+
+// List returns a list of jobs that match the label and field selectors.
+func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
+ result = &batch.JobList{}
+ err = c.r.Get().Namespace(c.ns).Resource("jobs").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular job.
+func (c *jobs) Get(name string) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Get().Namespace(c.ns).Resource("jobs").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new job.
+func (c *jobs) Create(job *batch.Job) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Post().Namespace(c.ns).Resource("jobs").Body(job).Do().Into(result)
+ return
+}
+
+// Update updates an existing job.
+func (c *jobs) Update(job *batch.Job) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Put().Namespace(c.ns).Resource("jobs").Name(job.Name).Body(job).Do().Into(result)
+ return
+}
+
+// Delete deletes a job, returns error if one occurs.
+func (c *jobs) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("jobs").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested jobs.
+func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// UpdateStatus takes the name of the job and the new status. Returns the server's representation of the job, and an error, if it occurs.
+func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Put().Namespace(c.ns).Resource("jobs").Name(job.Name).SubResource("status").Body(job).Do().Into(result)
+ return
+}
+
+// jobsV1 implements JobsNamespacer interface using BatchClient internally
+type jobsV1 struct {
+ r *BatchClient
+ ns string
+}
+
+// newJobsV1 returns a jobsV1
+func newJobsV1(c *BatchClient, namespace string) *jobsV1 {
+ return &jobsV1{c, namespace}
+}
+
+// Ensure statically that jobsV1 implements JobInterface.
+var _ JobInterface = &jobsV1{}
+
+// List returns a list of jobs that match the label and field selectors.
+func (c *jobsV1) List(opts api.ListOptions) (result *batch.JobList, err error) {
+ result = &batch.JobList{}
+ err = c.r.Get().Namespace(c.ns).Resource("jobs").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular job.
+func (c *jobsV1) Get(name string) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Get().Namespace(c.ns).Resource("jobs").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new job.
+func (c *jobsV1) Create(job *batch.Job) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Post().Namespace(c.ns).Resource("jobs").Body(job).Do().Into(result)
+ return
+}
+
+// Update updates an existing job.
+func (c *jobsV1) Update(job *batch.Job) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Put().Namespace(c.ns).Resource("jobs").Name(job.Name).Body(job).Do().Into(result)
+ return
+}
+
+// Delete deletes a job, returns error if one occurs.
+func (c *jobsV1) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("jobs").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested jobs.
+func (c *jobsV1) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// UpdateStatus takes the name of the job and the new status. Returns the server's representation of the job, and an error, if it occurs.
+func (c *jobsV1) UpdateStatus(job *batch.Job) (result *batch.Job, err error) {
+ result = &batch.Job{}
+ err = c.r.Put().Namespace(c.ns).Resource("jobs").Name(job.Name).SubResource("status").Body(job).Do().Into(result)
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/limit_ranges.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/limit_ranges.go
new file mode 100644
index 0000000..914a049
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/limit_ranges.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// LimitRangesNamespacer has methods to work with LimitRange resources in a namespace
+type LimitRangesNamespacer interface {
+ LimitRanges(namespace string) LimitRangeInterface
+}
+
+// LimitRangeInterface has methods to work with LimitRange resources.
+type LimitRangeInterface interface {
+ List(opts api.ListOptions) (*api.LimitRangeList, error)
+ Get(name string) (*api.LimitRange, error)
+ Delete(name string) error
+ Create(limitRange *api.LimitRange) (*api.LimitRange, error)
+ Update(limitRange *api.LimitRange) (*api.LimitRange, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// limitRanges implements LimitRangesNamespacer interface
+type limitRanges struct {
+ r *Client
+ ns string
+}
+
+// newLimitRanges returns a limitRanges
+func newLimitRanges(c *Client, namespace string) *limitRanges {
+ return &limitRanges{
+ r: c,
+ ns: namespace,
+ }
+}
+
+// List takes a selector, and returns the list of limitRanges that match that selector.
+func (c *limitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) {
+ result = &api.LimitRangeList{}
+ err = c.r.Get().Namespace(c.ns).Resource("limitRanges").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the limitRange, and returns the corresponding Pod object, and an error if it occurs
+func (c *limitRanges) Get(name string) (result *api.LimitRange, err error) {
+ result = &api.LimitRange{}
+ err = c.r.Get().Namespace(c.ns).Resource("limitRanges").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the limitRange, and returns an error if one occurs
+func (c *limitRanges) Delete(name string) error {
+ return c.r.Delete().Namespace(c.ns).Resource("limitRanges").Name(name).Do().Error()
+}
+
+// Create takes the representation of a limitRange. Returns the server's representation of the limitRange, and an error, if it occurs.
+func (c *limitRanges) Create(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
+ result = &api.LimitRange{}
+ err = c.r.Post().Namespace(c.ns).Resource("limitRanges").Body(limitRange).Do().Into(result)
+ return
+}
+
+// Update takes the representation of a limitRange to update. Returns the server's representation of the limitRange, and an error, if it occurs.
+func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
+ result = &api.LimitRange{}
+ err = c.r.Put().Namespace(c.ns).Resource("limitRanges").Name(limitRange.Name).Body(limitRange).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested resource
+func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("limitRanges").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/namespaces.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/namespaces.go
new file mode 100644
index 0000000..b4a3836
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/namespaces.go
@@ -0,0 +1,116 @@
+/*
+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 unversioned
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+type NamespacesInterface interface {
+ Namespaces() NamespaceInterface
+}
+
+type NamespaceInterface interface {
+ Create(item *api.Namespace) (*api.Namespace, error)
+ Get(name string) (result *api.Namespace, err error)
+ List(opts api.ListOptions) (*api.NamespaceList, error)
+ Delete(name string) error
+ Update(item *api.Namespace) (*api.Namespace, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ Finalize(item *api.Namespace) (*api.Namespace, error)
+ Status(item *api.Namespace) (*api.Namespace, error)
+}
+
+// namespaces implements NamespacesInterface
+type namespaces struct {
+ r *Client
+}
+
+// newNamespaces returns a namespaces object.
+func newNamespaces(c *Client) *namespaces {
+ return &namespaces{r: c}
+}
+
+// Create creates a new namespace.
+func (c *namespaces) Create(namespace *api.Namespace) (*api.Namespace, error) {
+ result := &api.Namespace{}
+ err := c.r.Post().Resource("namespaces").Body(namespace).Do().Into(result)
+ return result, err
+}
+
+// List lists all the namespaces in the cluster.
+func (c *namespaces) List(opts api.ListOptions) (*api.NamespaceList, error) {
+ result := &api.NamespaceList{}
+ err := c.r.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().Into(result)
+ return result, err
+}
+
+// Update 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) Update(namespace *api.Namespace) (result *api.Namespace, err error) {
+ result = &api.Namespace{}
+ err = c.r.Put().Resource("namespaces").Name(namespace.Name).Body(namespace).Do().Into(result)
+ return
+}
+
+// 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 *api.Namespace) (result *api.Namespace, err error) {
+ result = &api.Namespace{}
+ if len(namespace.ResourceVersion) == 0 {
+ err = fmt.Errorf("invalid update object, missing resource version: %v", namespace)
+ return
+ }
+ err = c.r.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
+ return
+}
+
+// Status 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) Status(namespace *api.Namespace) (result *api.Namespace, err error) {
+ result = &api.Namespace{}
+ if len(namespace.ResourceVersion) == 0 {
+ err = fmt.Errorf("invalid update object, missing resource version: %v", namespace)
+ return
+ }
+ err = c.r.Put().Resource("namespaces").Name(namespace.Name).SubResource("status").Body(namespace).Do().Into(result)
+ return
+}
+
+// Get gets an existing namespace
+func (c *namespaces) Get(name string) (*api.Namespace, error) {
+ result := &api.Namespace{}
+ err := c.r.Get().Resource("namespaces").Name(name).Do().Into(result)
+ return result, err
+}
+
+// Delete deletes an existing namespace.
+func (c *namespaces) Delete(name string) error {
+ return c.r.Delete().Resource("namespaces").Name(name).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested namespaces.
+func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Resource("namespaces").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/network_policys.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/network_policys.go
new file mode 100644
index 0000000..3e3f610
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/network_policys.go
@@ -0,0 +1,92 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// NetworkPolicyNamespacer has methods to work with NetworkPolicy resources in a namespace
+type NetworkPolicyNamespacer interface {
+ NetworkPolicies(namespace string) NetworkPolicyInterface
+}
+
+// NetworkPolicyInterface exposes methods to work on NetworkPolicy resources.
+type NetworkPolicyInterface interface {
+ List(opts api.ListOptions) (*extensions.NetworkPolicyList, error)
+ Get(name string) (*extensions.NetworkPolicy, error)
+ Create(networkPolicy *extensions.NetworkPolicy) (*extensions.NetworkPolicy, error)
+ Update(networkPolicy *extensions.NetworkPolicy) (*extensions.NetworkPolicy, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// NetworkPolicies implements NetworkPolicyNamespacer interface
+type NetworkPolicies struct {
+ r *ExtensionsClient
+ ns string
+}
+
+// newNetworkPolicies returns a NetworkPolicies
+func newNetworkPolicies(c *ExtensionsClient, namespace string) *NetworkPolicies {
+ return &NetworkPolicies{c, namespace}
+}
+
+// List returns a list of networkPolicy that match the label and field selectors.
+func (c *NetworkPolicies) List(opts api.ListOptions) (result *extensions.NetworkPolicyList, err error) {
+ result = &extensions.NetworkPolicyList{}
+ err = c.r.Get().Namespace(c.ns).Resource("networkpolicies").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular networkPolicy.
+func (c *NetworkPolicies) Get(name string) (result *extensions.NetworkPolicy, err error) {
+ result = &extensions.NetworkPolicy{}
+ err = c.r.Get().Namespace(c.ns).Resource("networkpolicies").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new networkPolicy.
+func (c *NetworkPolicies) Create(networkPolicy *extensions.NetworkPolicy) (result *extensions.NetworkPolicy, err error) {
+ result = &extensions.NetworkPolicy{}
+ err = c.r.Post().Namespace(c.ns).Resource("networkpolicies").Body(networkPolicy).Do().Into(result)
+ return
+}
+
+// Update updates an existing networkPolicy.
+func (c *NetworkPolicies) Update(networkPolicy *extensions.NetworkPolicy) (result *extensions.NetworkPolicy, err error) {
+ result = &extensions.NetworkPolicy{}
+ err = c.r.Put().Namespace(c.ns).Resource("networkpolicies").Name(networkPolicy.Name).Body(networkPolicy).Do().Into(result)
+ return
+}
+
+// Delete deletes a networkPolicy, returns error if one occurs.
+func (c *NetworkPolicies) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("networkpolicies").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested networkPolicy.
+func (c *NetworkPolicies) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/nodes.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/nodes.go
new file mode 100644
index 0000000..15a7db2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/nodes.go
@@ -0,0 +1,111 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+type NodesInterface interface {
+ Nodes() NodeInterface
+}
+
+type NodeInterface interface {
+ Get(name string) (result *api.Node, err error)
+ Create(node *api.Node) (*api.Node, error)
+ List(opts api.ListOptions) (*api.NodeList, error)
+ Delete(name string) error
+ DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
+ Update(*api.Node) (*api.Node, error)
+ UpdateStatus(*api.Node) (*api.Node, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// nodes implements NodesInterface
+type nodes struct {
+ r *Client
+}
+
+// newNodes returns a nodes object.
+func newNodes(c *Client) *nodes {
+ return &nodes{c}
+}
+
+// resourceName returns node's URL resource name.
+func (c *nodes) resourceName() string {
+ return "nodes"
+}
+
+// Create creates a new node.
+func (c *nodes) Create(node *api.Node) (*api.Node, error) {
+ result := &api.Node{}
+ err := c.r.Post().Resource(c.resourceName()).Body(node).Do().Into(result)
+ return result, err
+}
+
+// List takes a selector, and returns the list of nodes that match that selector in the cluster.
+func (c *nodes) List(opts api.ListOptions) (*api.NodeList, error) {
+ result := &api.NodeList{}
+ err := c.r.Get().Resource(c.resourceName()).VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return result, err
+}
+
+// Get gets an existing node.
+func (c *nodes) Get(name string) (*api.Node, error) {
+ result := &api.Node{}
+ err := c.r.Get().Resource(c.resourceName()).Name(name).Do().Into(result)
+ return result, err
+}
+
+// Delete deletes an existing node.
+func (c *nodes) Delete(name string) error {
+ return c.r.Delete().Resource(c.resourceName()).Name(name).Do().Error()
+}
+
+// DeleteCollection deletes a collection of nodes.
+func (c *nodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
+ return c.r.Delete().
+ Resource(c.resourceName()).
+ VersionedParams(&listOptions, api.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Update updates an existing node.
+func (c *nodes) Update(node *api.Node) (*api.Node, error) {
+ result := &api.Node{}
+ err := c.r.Put().Resource(c.resourceName()).Name(node.Name).Body(node).Do().Into(result)
+ return result, err
+}
+
+func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) {
+ result := &api.Node{}
+ err := c.r.Put().Resource(c.resourceName()).Name(node.Name).SubResource("status").Body(node).Do().Into(result)
+ return result, err
+}
+
+// Watch returns a watch.Interface that watches the requested nodes.
+func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(api.NamespaceAll).
+ Resource(c.resourceName()).
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumeclaim.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumeclaim.go
new file mode 100644
index 0000000..4ea3a95
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumeclaim.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// PersistentVolumeClaimsNamespacer has methods to work with PersistentVolumeClaim resources in a namespace
+type PersistentVolumeClaimsNamespacer interface {
+ PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
+}
+
+// PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.
+type PersistentVolumeClaimInterface interface {
+ List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error)
+ Get(name string) (*api.PersistentVolumeClaim, error)
+ Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
+ Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
+ UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
+ Delete(name string) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// persistentVolumeClaims implements PersistentVolumeClaimsNamespacer interface
+type persistentVolumeClaims struct {
+ client *Client
+ namespace string
+}
+
+// newPersistentVolumeClaims returns a PodsClient
+func newPersistentVolumeClaims(c *Client, namespace string) *persistentVolumeClaims {
+ return &persistentVolumeClaims{c, namespace}
+}
+
+func (c *persistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) {
+ result = &api.PersistentVolumeClaimList{}
+
+ err = c.client.Get().
+ Namespace(c.namespace).
+ Resource("persistentVolumeClaims").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *persistentVolumeClaims) Get(name string) (result *api.PersistentVolumeClaim, err error) {
+ result = &api.PersistentVolumeClaim{}
+ err = c.client.Get().Namespace(c.namespace).Resource("persistentVolumeClaims").Name(name).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumeClaims) Create(claim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
+ result = &api.PersistentVolumeClaim{}
+ err = c.client.Post().Namespace(c.namespace).Resource("persistentVolumeClaims").Body(claim).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumeClaims) Update(claim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
+ result = &api.PersistentVolumeClaim{}
+ err = c.client.Put().Namespace(c.namespace).Resource("persistentVolumeClaims").Name(claim.Name).Body(claim).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumeClaims) UpdateStatus(claim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
+ result = &api.PersistentVolumeClaim{}
+ err = c.client.Put().Namespace(c.namespace).Resource("persistentVolumeClaims").Name(claim.Name).SubResource("status").Body(claim).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumeClaims) Delete(name string) error {
+ return c.client.Delete().Namespace(c.namespace).Resource("persistentVolumeClaims").Name(name).Do().Error()
+}
+
+func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.namespace).
+ Resource("persistentVolumeClaims").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumes.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumes.go
new file mode 100644
index 0000000..5fce1f0
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/persistentvolumes.go
@@ -0,0 +1,93 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+type PersistentVolumesInterface interface {
+ PersistentVolumes() PersistentVolumeInterface
+}
+
+// PersistentVolumeInterface has methods to work with PersistentVolume resources.
+type PersistentVolumeInterface interface {
+ List(opts api.ListOptions) (*api.PersistentVolumeList, error)
+ Get(name string) (*api.PersistentVolume, error)
+ Create(volume *api.PersistentVolume) (*api.PersistentVolume, error)
+ Update(volume *api.PersistentVolume) (*api.PersistentVolume, error)
+ UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error)
+ Delete(name string) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// persistentVolumes implements PersistentVolumesInterface
+type persistentVolumes struct {
+ client *Client
+}
+
+func newPersistentVolumes(c *Client) *persistentVolumes {
+ return &persistentVolumes{c}
+}
+
+func (c *persistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) {
+ result = &api.PersistentVolumeList{}
+ err = c.client.Get().
+ Resource("persistentVolumes").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+func (c *persistentVolumes) Get(name string) (result *api.PersistentVolume, err error) {
+ result = &api.PersistentVolume{}
+ err = c.client.Get().Resource("persistentVolumes").Name(name).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumes) Create(volume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
+ result = &api.PersistentVolume{}
+ err = c.client.Post().Resource("persistentVolumes").Body(volume).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumes) Update(volume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
+ result = &api.PersistentVolume{}
+ err = c.client.Put().Resource("persistentVolumes").Name(volume.Name).Body(volume).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumes) UpdateStatus(volume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
+ result = &api.PersistentVolume{}
+ err = c.client.Put().Resource("persistentVolumes").Name(volume.Name).SubResource("status").Body(volume).Do().Into(result)
+ return
+}
+
+func (c *persistentVolumes) Delete(name string) error {
+ return c.client.Delete().Resource("persistentVolumes").Name(name).Do().Error()
+}
+
+func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Resource("persistentVolumes").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pet_sets.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pet_sets.go
new file mode 100644
index 0000000..954efcd
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pet_sets.go
@@ -0,0 +1,100 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// PetSetNamespacer has methods to work with PetSet resources in a namespace
+type PetSetNamespacer interface {
+ PetSets(namespace string) PetSetInterface
+}
+
+// PetSetInterface exposes methods to work on PetSet resources.
+type PetSetInterface interface {
+ List(opts api.ListOptions) (*apps.PetSetList, error)
+ Get(name string) (*apps.PetSet, error)
+ Create(petSet *apps.PetSet) (*apps.PetSet, error)
+ Update(petSet *apps.PetSet) (*apps.PetSet, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ UpdateStatus(petSet *apps.PetSet) (*apps.PetSet, error)
+}
+
+// petSet implements PetSetNamespacer interface
+type petSet struct {
+ r *AppsClient
+ ns string
+}
+
+// newPetSet returns a petSet
+func newPetSet(c *AppsClient, namespace string) *petSet {
+ return &petSet{c, namespace}
+}
+
+// List returns a list of petSet that match the label and field selectors.
+func (c *petSet) List(opts api.ListOptions) (result *apps.PetSetList, err error) {
+ result = &apps.PetSetList{}
+ err = c.r.Get().Namespace(c.ns).Resource("petsets").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular petSet.
+func (c *petSet) Get(name string) (result *apps.PetSet, err error) {
+ result = &apps.PetSet{}
+ err = c.r.Get().Namespace(c.ns).Resource("petsets").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new petSet.
+func (c *petSet) Create(petSet *apps.PetSet) (result *apps.PetSet, err error) {
+ result = &apps.PetSet{}
+ err = c.r.Post().Namespace(c.ns).Resource("petsets").Body(petSet).Do().Into(result)
+ return
+}
+
+// Update updates an existing petSet.
+func (c *petSet) Update(petSet *apps.PetSet) (result *apps.PetSet, err error) {
+ result = &apps.PetSet{}
+ err = c.r.Put().Namespace(c.ns).Resource("petsets").Name(petSet.Name).Body(petSet).Do().Into(result)
+ return
+}
+
+// Delete deletes a petSet, returns error if one occurs.
+func (c *petSet) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("petsets").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested petSet.
+func (c *petSet) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("petsets").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// UpdateStatus takes the name of the petSet and the new status. Returns the server's representation of the petSet, and an error, if it occurs.
+func (c *petSet) UpdateStatus(petSet *apps.PetSet) (result *apps.PetSet, err error) {
+ result = &apps.PetSet{}
+ err = c.r.Put().Namespace(c.ns).Resource("petsets").Name(petSet.Name).SubResource("status").Body(petSet).Do().Into(result)
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_disruption_budgets.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_disruption_budgets.go
new file mode 100644
index 0000000..0239623
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_disruption_budgets.go
@@ -0,0 +1,100 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/policy"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// PodDisruptionBudgetNamespacer has methods to work with PodDisruptionBudget resources in a namespace
+type PodDisruptionBudgetNamespacer interface {
+ PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
+}
+
+// PodDisruptionBudgetInterface exposes methods to work on PodDisruptionBudget resources.
+type PodDisruptionBudgetInterface interface {
+ List(opts api.ListOptions) (*policy.PodDisruptionBudgetList, error)
+ Get(name string) (*policy.PodDisruptionBudget, error)
+ Create(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error)
+ Update(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ UpdateStatus(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error)
+}
+
+// podDisruptionBudget implements PodDisruptionBudgetNamespacer interface
+type podDisruptionBudget struct {
+ r *PolicyClient
+ ns string
+}
+
+// newPodDisruptionBudget returns a podDisruptionBudget
+func newPodDisruptionBudget(c *PolicyClient, namespace string) *podDisruptionBudget {
+ return &podDisruptionBudget{c, namespace}
+}
+
+// List returns a list of podDisruptionBudget that match the label and field selectors.
+func (c *podDisruptionBudget) List(opts api.ListOptions) (result *policy.PodDisruptionBudgetList, err error) {
+ result = &policy.PodDisruptionBudgetList{}
+ err = c.r.Get().Namespace(c.ns).Resource("poddisruptionbudgets").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular podDisruptionBudget.
+func (c *podDisruptionBudget) Get(name string) (result *policy.PodDisruptionBudget, err error) {
+ result = &policy.PodDisruptionBudget{}
+ err = c.r.Get().Namespace(c.ns).Resource("poddisruptionbudgets").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new podDisruptionBudget.
+func (c *podDisruptionBudget) Create(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) {
+ result = &policy.PodDisruptionBudget{}
+ err = c.r.Post().Namespace(c.ns).Resource("poddisruptionbudgets").Body(podDisruptionBudget).Do().Into(result)
+ return
+}
+
+// Update updates an existing podDisruptionBudget.
+func (c *podDisruptionBudget) Update(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) {
+ result = &policy.PodDisruptionBudget{}
+ err = c.r.Put().Namespace(c.ns).Resource("poddisruptionbudgets").Name(podDisruptionBudget.Name).Body(podDisruptionBudget).Do().Into(result)
+ return
+}
+
+// Delete deletes a podDisruptionBudget, returns error if one occurs.
+func (c *podDisruptionBudget) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("poddisruptionbudgets").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested podDisruptionBudget.
+func (c *podDisruptionBudget) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// UpdateStatus takes the name of the podDisruptionBudget and the new status. Returns the server's representation of the podDisruptionBudget, and an error, if it occurs.
+func (c *podDisruptionBudget) UpdateStatus(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) {
+ result = &policy.PodDisruptionBudget{}
+ err = c.r.Put().Namespace(c.ns).Resource("poddisruptionbudgets").Name(podDisruptionBudget.Name).SubResource("status").Body(podDisruptionBudget).Do().Into(result)
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_templates.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_templates.go
new file mode 100644
index 0000000..7627d73
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pod_templates.go
@@ -0,0 +1,94 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// PodTemplatesNamespacer has methods to work with PodTemplate resources in a namespace
+type PodTemplatesNamespacer interface {
+ PodTemplates(namespace string) PodTemplateInterface
+}
+
+// PodTemplateInterface has methods to work with PodTemplate resources.
+type PodTemplateInterface interface {
+ List(opts api.ListOptions) (*api.PodTemplateList, error)
+ Get(name string) (*api.PodTemplate, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(podTemplate *api.PodTemplate) (*api.PodTemplate, error)
+ Update(podTemplate *api.PodTemplate) (*api.PodTemplate, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// podTemplates implements PodTemplatesNamespacer interface
+type podTemplates struct {
+ r *Client
+ ns string
+}
+
+// newPodTemplates returns a podTemplates
+func newPodTemplates(c *Client, namespace string) *podTemplates {
+ return &podTemplates{
+ r: c,
+ ns: namespace,
+ }
+}
+
+// List takes label and field selectors, and returns the list of podTemplates that match those selectors.
+func (c *podTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, err error) {
+ result = &api.PodTemplateList{}
+ err = c.r.Get().Namespace(c.ns).Resource("podTemplates").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the podTemplate, and returns the corresponding PodTemplate object, and an error if it occurs
+func (c *podTemplates) Get(name string) (result *api.PodTemplate, err error) {
+ result = &api.PodTemplate{}
+ err = c.r.Get().Namespace(c.ns).Resource("podTemplates").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the podTemplate, and returns an error if one occurs
+func (c *podTemplates) Delete(name string, options *api.DeleteOptions) error {
+ return c.r.Delete().Namespace(c.ns).Resource("podTemplates").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a podTemplate. Returns the server's representation of the podTemplate, and an error, if it occurs.
+func (c *podTemplates) Create(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
+ result = &api.PodTemplate{}
+ err = c.r.Post().Namespace(c.ns).Resource("podTemplates").Body(podTemplate).Do().Into(result)
+ return
+}
+
+// Update takes the representation of a podTemplate to update. Returns the server's representation of the podTemplate, and an error, if it occurs.
+func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
+ result = &api.PodTemplate{}
+ err = c.r.Put().Namespace(c.ns).Resource("podTemplates").Name(podTemplate.Name).Body(podTemplate).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podTemplates.
+func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("podTemplates").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pods.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pods.go
new file mode 100644
index 0000000..ea16fb8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/pods.go
@@ -0,0 +1,115 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// PodsNamespacer has methods to work with Pod resources in a namespace
+type PodsNamespacer interface {
+ Pods(namespace string) PodInterface
+}
+
+// PodInterface has methods to work with Pod resources.
+type PodInterface interface {
+ List(opts api.ListOptions) (*api.PodList, error)
+ Get(name string) (*api.Pod, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(pod *api.Pod) (*api.Pod, error)
+ Update(pod *api.Pod) (*api.Pod, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ Bind(binding *api.Binding) error
+ UpdateStatus(pod *api.Pod) (*api.Pod, error)
+ GetLogs(name string, opts *api.PodLogOptions) *restclient.Request
+}
+
+// pods implements PodsNamespacer interface
+type pods struct {
+ r *Client
+ ns string
+}
+
+// newPods returns a pods
+func newPods(c *Client, namespace string) *pods {
+ return &pods{
+ r: c,
+ ns: namespace,
+ }
+}
+
+// List takes label and field selectors, and returns the list of pods that match those selectors.
+func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) {
+ result = &api.PodList{}
+ err = c.r.Get().Namespace(c.ns).Resource("pods").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the pod, and returns the corresponding Pod object, and an error if it occurs
+func (c *pods) Get(name string) (result *api.Pod, err error) {
+ result = &api.Pod{}
+ err = c.r.Get().Namespace(c.ns).Resource("pods").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the pod, and returns an error if one occurs
+func (c *pods) Delete(name string, options *api.DeleteOptions) error {
+ return c.r.Delete().Namespace(c.ns).Resource("pods").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a pod. Returns the server's representation of the pod, and an error, if it occurs.
+func (c *pods) Create(pod *api.Pod) (result *api.Pod, err error) {
+ result = &api.Pod{}
+ err = c.r.Post().Namespace(c.ns).Resource("pods").Body(pod).Do().Into(result)
+ return
+}
+
+// Update takes the representation of a pod to update. Returns the server's representation of the pod, and an error, if it occurs.
+func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) {
+ result = &api.Pod{}
+ err = c.r.Put().Namespace(c.ns).Resource("pods").Name(pod.Name).Body(pod).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested pods.
+func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
+func (c *pods) Bind(binding *api.Binding) error {
+ return c.r.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error()
+}
+
+// UpdateStatus takes the name of the pod and the new status. Returns the server's representation of the pod, and an error, if it occurs.
+func (c *pods) UpdateStatus(pod *api.Pod) (result *api.Pod, err error) {
+ result = &api.Pod{}
+ err = c.r.Put().Namespace(c.ns).Resource("pods").Name(pod.Name).SubResource("status").Body(pod).Do().Into(result)
+ return
+}
+
+// Get constructs a request for getting the logs for a pod
+func (c *pods) GetLogs(name string, opts *api.PodLogOptions) *restclient.Request {
+ return c.r.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, api.ParameterCodec)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/podsecuritypolicy.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/podsecuritypolicy.go
new file mode 100644
index 0000000..f03e643
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/podsecuritypolicy.go
@@ -0,0 +1,111 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+type PodSecurityPoliciesInterface interface {
+ PodSecurityPolicies() PodSecurityPolicyInterface
+}
+
+type PodSecurityPolicyInterface interface {
+ Get(name string) (result *extensions.PodSecurityPolicy, err error)
+ Create(psp *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error)
+ List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error)
+ Delete(name string) error
+ Update(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// podSecurityPolicy implements PodSecurityPolicyInterface
+type podSecurityPolicy struct {
+ client *ExtensionsClient
+}
+
+// newPodSecurityPolicy returns a podSecurityPolicy object.
+func newPodSecurityPolicy(c *ExtensionsClient) *podSecurityPolicy {
+ return &podSecurityPolicy{c}
+}
+
+func (s *podSecurityPolicy) Create(psp *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) {
+ result := &extensions.PodSecurityPolicy{}
+ err := s.client.Post().
+ Resource("podsecuritypolicies").
+ Body(psp).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// List returns a list of PodSecurityPolicies matching the selectors.
+func (s *podSecurityPolicy) List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error) {
+ result := &extensions.PodSecurityPolicyList{}
+
+ err := s.client.Get().
+ Resource("podsecuritypolicies").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// Get returns the given PodSecurityPolicy, or an error.
+func (s *podSecurityPolicy) Get(name string) (*extensions.PodSecurityPolicy, error) {
+ result := &extensions.PodSecurityPolicy{}
+ err := s.client.Get().
+ Resource("podsecuritypolicies").
+ Name(name).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// Watch starts watching for PodSecurityPolicies matching the given selectors.
+func (s *podSecurityPolicy) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return s.client.Get().
+ Prefix("watch").
+ Resource("podsecuritypolicies").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+func (s *podSecurityPolicy) Delete(name string) error {
+ return s.client.Delete().
+ Resource("podsecuritypolicies").
+ Name(name).
+ Do().
+ Error()
+}
+
+func (s *podSecurityPolicy) Update(psp *extensions.PodSecurityPolicy) (result *extensions.PodSecurityPolicy, err error) {
+ result = &extensions.PodSecurityPolicy{}
+ err = s.client.Put().
+ Resource("podsecuritypolicies").
+ Name(psp.Name).
+ Body(psp).
+ Do().
+ Into(result)
+
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/policy.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/policy.go
new file mode 100644
index 0000000..9a47d79
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/policy.go
@@ -0,0 +1,76 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/policy"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+type PolicyInterface interface {
+ PodDisruptionBudgetNamespacer
+}
+
+// PolicyClient is used to interact with Kubernetes batch features.
+type PolicyClient struct {
+ *restclient.RESTClient
+}
+
+func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface {
+ return newPodDisruptionBudget(c, namespace)
+}
+
+func NewPolicy(c *restclient.Config) (*PolicyClient, error) {
+ config := *c
+ if err := setPolicyDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &PolicyClient{client}, nil
+}
+
+func NewPolicyOrDie(c *restclient.Config) *PolicyClient {
+ client, err := NewPolicy(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setPolicyDefaults(config *restclient.Config) error {
+ g, err := registered.Group(policy.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rbac.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rbac.go
new file mode 100644
index 0000000..09b2b40
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rbac.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+// Interface holds the methods for clients of Kubernetes to allow mock testing.
+type RbacInterface interface {
+ RoleBindingsNamespacer
+ RolesNamespacer
+ ClusterRoleBindings
+ ClusterRoles
+}
+
+type RbacClient struct {
+ *restclient.RESTClient
+}
+
+func (c *RbacClient) RoleBindings(namespace string) RoleBindingInterface {
+ return newRoleBindings(c, namespace)
+}
+
+func (c *RbacClient) Roles(namespace string) RoleInterface {
+ return newRoles(c, namespace)
+}
+
+func (c *RbacClient) ClusterRoleBindings() ClusterRoleBindingInterface {
+ return newClusterRoleBindings(c)
+}
+
+func (c *RbacClient) ClusterRoles() ClusterRoleInterface {
+ return newClusterRoles(c)
+}
+
+// NewRbac creates a new RbacClient for the given config.
+func NewRbac(c *restclient.Config) (*RbacClient, error) {
+ config := *c
+ if err := setRbacDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &RbacClient{client}, nil
+}
+
+// NewRbacOrDie creates a new RbacClient for the given config and
+// panics if there is an error in the config.
+func NewRbacOrDie(c *restclient.Config) *RbacClient {
+ client, err := NewRbac(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+func setRbacDefaults(config *restclient.Config) error {
+ // if rbac group is not registered, return an error
+ g, err := registered.Group(rbac.GroupName)
+ if err != nil {
+ return err
+ }
+ config.APIPath = defaultAPIPath
+ if config.UserAgent == "" {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+
+ // TODO: Unconditionally set the config.Version, until we fix the config.
+ //if config.Version == "" {
+ copyGroupVersion := g.GroupVersion
+ config.GroupVersion = &copyGroupVersion
+ //}
+
+ config.NegotiatedSerializer = api.Codecs
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replica_sets.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replica_sets.go
new file mode 100644
index 0000000..191a006
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replica_sets.go
@@ -0,0 +1,100 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ReplicaSetsNamespacer has methods to work with ReplicaSet resources in a namespace
+type ReplicaSetsNamespacer interface {
+ ReplicaSets(namespace string) ReplicaSetInterface
+}
+
+// ReplicaSetInterface has methods to work with ReplicaSet resources.
+type ReplicaSetInterface interface {
+ List(opts api.ListOptions) (*extensions.ReplicaSetList, error)
+ Get(name string) (*extensions.ReplicaSet, error)
+ Create(ctrl *extensions.ReplicaSet) (*extensions.ReplicaSet, error)
+ Update(ctrl *extensions.ReplicaSet) (*extensions.ReplicaSet, error)
+ UpdateStatus(ctrl *extensions.ReplicaSet) (*extensions.ReplicaSet, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// replicaSets implements ReplicaSetsNamespacer interface
+type replicaSets struct {
+ client *ExtensionsClient
+ ns string
+}
+
+// newReplicaSets returns a ReplicaSetClient
+func newReplicaSets(c *ExtensionsClient, namespace string) *replicaSets {
+ return &replicaSets{c, namespace}
+}
+
+// List takes a selector, and returns the list of ReplicaSets that match that selector.
+func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) {
+ result = &extensions.ReplicaSetList{}
+ err = c.client.Get().Namespace(c.ns).Resource("replicasets").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular ReplicaSet.
+func (c *replicaSets) Get(name string) (result *extensions.ReplicaSet, err error) {
+ result = &extensions.ReplicaSet{}
+ err = c.client.Get().Namespace(c.ns).Resource("replicasets").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new ReplicaSet.
+func (c *replicaSets) Create(rs *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
+ result = &extensions.ReplicaSet{}
+ err = c.client.Post().Namespace(c.ns).Resource("replicasets").Body(rs).Do().Into(result)
+ return
+}
+
+// Update updates an existing ReplicaSet.
+func (c *replicaSets) Update(rs *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
+ result = &extensions.ReplicaSet{}
+ err = c.client.Put().Namespace(c.ns).Resource("replicasets").Name(rs.Name).Body(rs).Do().Into(result)
+ return
+}
+
+// UpdateStatus updates an existing ReplicaSet status
+func (c *replicaSets) UpdateStatus(rs *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
+ result = &extensions.ReplicaSet{}
+ err = c.client.Put().Namespace(c.ns).Resource("replicasets").Name(rs.Name).SubResource("status").Body(rs).Do().Into(result)
+ return
+}
+
+// Delete deletes an existing ReplicaSet.
+func (c *replicaSets) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.client.Delete().Namespace(c.ns).Resource("replicasets").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested ReplicaSets.
+func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replication_controllers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replication_controllers.go
new file mode 100644
index 0000000..e4b9e2d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/replication_controllers.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ReplicationControllersNamespacer has methods to work with ReplicationController resources in a namespace
+type ReplicationControllersNamespacer interface {
+ ReplicationControllers(namespace string) ReplicationControllerInterface
+}
+
+// ReplicationControllerInterface has methods to work with ReplicationController resources.
+type ReplicationControllerInterface interface {
+ List(opts api.ListOptions) (*api.ReplicationControllerList, error)
+ Get(name string) (*api.ReplicationController, error)
+ Create(ctrl *api.ReplicationController) (*api.ReplicationController, error)
+ Update(ctrl *api.ReplicationController) (*api.ReplicationController, error)
+ UpdateStatus(ctrl *api.ReplicationController) (*api.ReplicationController, error)
+ Delete(name string) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// replicationControllers implements ReplicationControllersNamespacer interface
+type replicationControllers struct {
+ r *Client
+ ns string
+}
+
+// newReplicationControllers returns a PodsClient
+func newReplicationControllers(c *Client, namespace string) *replicationControllers {
+ return &replicationControllers{c, namespace}
+}
+
+// List takes a selector, and returns the list of replication controllers that match that selector.
+func (c *replicationControllers) List(opts api.ListOptions) (result *api.ReplicationControllerList, err error) {
+ result = &api.ReplicationControllerList{}
+ err = c.r.Get().Namespace(c.ns).Resource("replicationControllers").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular replication controller.
+func (c *replicationControllers) Get(name string) (result *api.ReplicationController, err error) {
+ result = &api.ReplicationController{}
+ err = c.r.Get().Namespace(c.ns).Resource("replicationControllers").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new replication controller.
+func (c *replicationControllers) Create(controller *api.ReplicationController) (result *api.ReplicationController, err error) {
+ result = &api.ReplicationController{}
+ err = c.r.Post().Namespace(c.ns).Resource("replicationControllers").Body(controller).Do().Into(result)
+ return
+}
+
+// Update updates an existing replication controller.
+func (c *replicationControllers) Update(controller *api.ReplicationController) (result *api.ReplicationController, err error) {
+ result = &api.ReplicationController{}
+ err = c.r.Put().Namespace(c.ns).Resource("replicationControllers").Name(controller.Name).Body(controller).Do().Into(result)
+ return
+}
+
+// UpdateStatus updates an existing replication controller status
+func (c *replicationControllers) UpdateStatus(controller *api.ReplicationController) (result *api.ReplicationController, err error) {
+ result = &api.ReplicationController{}
+ err = c.r.Put().Namespace(c.ns).Resource("replicationControllers").Name(controller.Name).SubResource("status").Body(controller).Do().Into(result)
+ return
+}
+
+// Delete deletes an existing replication controller.
+func (c *replicationControllers) Delete(name string) error {
+ return c.r.Delete().Namespace(c.ns).Resource("replicationControllers").Name(name).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested controllers.
+func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("replicationControllers").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/resource_quotas.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/resource_quotas.go
new file mode 100644
index 0000000..9944cef
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/resource_quotas.go
@@ -0,0 +1,102 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ResourceQuotasNamespacer has methods to work with ResourceQuota resources in a namespace
+type ResourceQuotasNamespacer interface {
+ ResourceQuotas(namespace string) ResourceQuotaInterface
+}
+
+// ResourceQuotaInterface has methods to work with ResourceQuota resources.
+type ResourceQuotaInterface interface {
+ List(opts api.ListOptions) (*api.ResourceQuotaList, error)
+ Get(name string) (*api.ResourceQuota, error)
+ Delete(name string) error
+ Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
+ Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
+ UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// resourceQuotas implements ResourceQuotasNamespacer interface
+type resourceQuotas struct {
+ r *Client
+ ns string
+}
+
+// newResourceQuotas returns a resourceQuotas
+func newResourceQuotas(c *Client, namespace string) *resourceQuotas {
+ return &resourceQuotas{
+ r: c,
+ ns: namespace,
+ }
+}
+
+// List takes a selector, and returns the list of resourceQuotas that match that selector.
+func (c *resourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaList, err error) {
+ result = &api.ResourceQuotaList{}
+ err = c.r.Get().Namespace(c.ns).Resource("resourceQuotas").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the resourceQuota, and returns the corresponding ResourceQuota object, and an error if it occurs
+func (c *resourceQuotas) Get(name string) (result *api.ResourceQuota, err error) {
+ result = &api.ResourceQuota{}
+ err = c.r.Get().Namespace(c.ns).Resource("resourceQuotas").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the resourceQuota, and returns an error if one occurs
+func (c *resourceQuotas) Delete(name string) error {
+ return c.r.Delete().Namespace(c.ns).Resource("resourceQuotas").Name(name).Do().Error()
+}
+
+// Create takes the representation of a resourceQuota. Returns the server's representation of the resourceQuota, and an error, if it occurs.
+func (c *resourceQuotas) Create(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
+ result = &api.ResourceQuota{}
+ err = c.r.Post().Namespace(c.ns).Resource("resourceQuotas").Body(resourceQuota).Do().Into(result)
+ return
+}
+
+// Update takes the representation of a resourceQuota to update spec. Returns the server's representation of the resourceQuota, and an error, if it occurs.
+func (c *resourceQuotas) Update(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
+ result = &api.ResourceQuota{}
+ err = c.r.Put().Namespace(c.ns).Resource("resourceQuotas").Name(resourceQuota.Name).Body(resourceQuota).Do().Into(result)
+ return
+}
+
+// Status takes the representation of a resourceQuota to update status. Returns the server's representation of the resourceQuota, and an error, if it occurs.
+func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
+ result = &api.ResourceQuota{}
+ err = c.r.Put().Namespace(c.ns).Resource("resourceQuotas").Name(resourceQuota.Name).SubResource("status").Body(resourceQuota).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested resource
+func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("resourceQuotas").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rolebindings.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rolebindings.go
new file mode 100644
index 0000000..b798380
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/rolebindings.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// RoleBindingsNamespacer has methods to work with RoleBinding resources in a namespace
+type RoleBindingsNamespacer interface {
+ RoleBindings(namespace string) RoleBindingInterface
+}
+
+// RoleBindingInterface has methods to work with RoleBinding resources.
+type RoleBindingInterface interface {
+ List(opts api.ListOptions) (*rbac.RoleBindingList, error)
+ Get(name string) (*rbac.RoleBinding, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error)
+ Update(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// roleBindings implements RoleBindingsNamespacer interface
+type roleBindings struct {
+ client *RbacClient
+ ns string
+}
+
+// newRoleBindings returns a roleBindings
+func newRoleBindings(c *RbacClient, namespace string) *roleBindings {
+ return &roleBindings{
+ client: c,
+ ns: namespace,
+ }
+}
+
+// List takes label and field selectors, and returns the list of roleBindings that match those selectors.
+func (c *roleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingList, err error) {
+ result = &rbac.RoleBindingList{}
+ err = c.client.Get().Namespace(c.ns).Resource("rolebindings").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the roleBinding, and returns the corresponding RoleBinding object, and an error if it occurs
+func (c *roleBindings) Get(name string) (result *rbac.RoleBinding, err error) {
+ result = &rbac.RoleBinding{}
+ err = c.client.Get().Namespace(c.ns).Resource("rolebindings").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the roleBinding and deletes it. Returns an error if one occurs.
+func (c *roleBindings) Delete(name string, options *api.DeleteOptions) error {
+ return c.client.Delete().Namespace(c.ns).Resource("rolebindings").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if it occurs.
+func (c *roleBindings) Create(roleBinding *rbac.RoleBinding) (result *rbac.RoleBinding, err error) {
+ result = &rbac.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 it occurs.
+func (c *roleBindings) Update(roleBinding *rbac.RoleBinding) (result *rbac.RoleBinding, err error) {
+ result = &rbac.RoleBinding{}
+ err = c.client.Put().Namespace(c.ns).Resource("rolebindings").Name(roleBinding.Name).Body(roleBinding).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roleBindings.
+func (c *roleBindings) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/roles.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/roles.go
new file mode 100644
index 0000000..b265e78
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/roles.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// RolesNamespacer has methods to work with Role resources in a namespace
+type RolesNamespacer interface {
+ Roles(namespace string) RoleInterface
+}
+
+// RoleInterface has methods to work with Role resources.
+type RoleInterface interface {
+ List(opts api.ListOptions) (*rbac.RoleList, error)
+ Get(name string) (*rbac.Role, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Create(role *rbac.Role) (*rbac.Role, error)
+ Update(role *rbac.Role) (*rbac.Role, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// roles implements RolesNamespacer interface
+type roles struct {
+ client *RbacClient
+ ns string
+}
+
+// newRoles returns a roles
+func newRoles(c *RbacClient, namespace string) *roles {
+ return &roles{
+ client: c,
+ ns: namespace,
+ }
+}
+
+// List takes label and field selectors, and returns the list of roles that match those selectors.
+func (c *roles) List(opts api.ListOptions) (result *rbac.RoleList, err error) {
+ result = &rbac.RoleList{}
+ err = c.client.Get().Namespace(c.ns).Resource("roles").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get takes the name of the role, and returns the corresponding Role object, and an error if it occurs
+func (c *roles) Get(name string) (result *rbac.Role, err error) {
+ result = &rbac.Role{}
+ err = c.client.Get().Namespace(c.ns).Resource("roles").Name(name).Do().Into(result)
+ return
+}
+
+// Delete takes the name of the role and deletes it. Returns an error if one occurs.
+func (c *roles) Delete(name string, options *api.DeleteOptions) error {
+ return c.client.Delete().Namespace(c.ns).Resource("roles").Name(name).Body(options).Do().Error()
+}
+
+// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if it occurs.
+func (c *roles) Create(role *rbac.Role) (result *rbac.Role, err error) {
+ result = &rbac.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 it occurs.
+func (c *roles) Update(role *rbac.Role) (result *rbac.Role, err error) {
+ result = &rbac.Role{}
+ err = c.client.Put().Namespace(c.ns).Resource("roles").Name(role.Name).Body(role).Do().Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roles.
+func (c *roles) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.client.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scale.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scale.go
new file mode 100644
index 0000000..a55b077
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scale.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+)
+
+type ScaleNamespacer interface {
+ Scales(namespace string) ScaleInterface
+}
+
+// ScaleInterface has methods to work with Scale (sub)resources.
+type ScaleInterface interface {
+ Get(string, string) (*extensions.Scale, error)
+ Update(string, *extensions.Scale) (*extensions.Scale, error)
+}
+
+// horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface
+type scales struct {
+ client *ExtensionsClient
+ ns string
+}
+
+// newHorizontalPodAutoscalers returns a horizontalPodAutoscalers
+func newScales(c *ExtensionsClient, namespace string) *scales {
+ return &scales{
+ client: c,
+ ns: namespace,
+ }
+}
+
+// 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 *extensions.Scale, err error) {
+ result = &extensions.Scale{}
+
+ // TODO this method needs to take a proper unambiguous kind
+ fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind}
+ resource, _ := meta.KindToResource(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 *extensions.Scale) (result *extensions.Scale, err error) {
+ result = &extensions.Scale{}
+
+ // TODO this method needs to take a proper unambiguous kind
+ fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind}
+ resource, _ := meta.KindToResource(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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scheduledjobs.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scheduledjobs.go
new file mode 100644
index 0000000..de07a7e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/scheduledjobs.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ScheduledJobsNamespacer has methods to work with ScheduledJob resources in a namespace
+type ScheduledJobsNamespacer interface {
+ ScheduledJobs(namespace string) ScheduledJobInterface
+}
+
+// ScheduledJobInterface exposes methods to work on ScheduledJob resources.
+type ScheduledJobInterface interface {
+ List(opts api.ListOptions) (*batch.ScheduledJobList, error)
+ Get(name string) (*batch.ScheduledJob, error)
+ Create(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error)
+ Update(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error)
+ Delete(name string, options *api.DeleteOptions) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ UpdateStatus(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error)
+}
+
+// scheduledJobs implements ScheduledJobsNamespacer interface
+type scheduledJobs struct {
+ r *BatchClient
+ ns string
+}
+
+// newScheduledJobs returns a scheduledJobs
+func newScheduledJobs(c *BatchClient, namespace string) *scheduledJobs {
+ return &scheduledJobs{c, namespace}
+}
+
+// Ensure statically that scheduledJobs implements ScheduledJobInterface.
+var _ ScheduledJobInterface = &scheduledJobs{}
+
+// List returns a list of scheduled jobs that match the label and field selectors.
+func (c *scheduledJobs) List(opts api.ListOptions) (result *batch.ScheduledJobList, err error) {
+ result = &batch.ScheduledJobList{}
+ err = c.r.Get().Namespace(c.ns).Resource("scheduledJobs").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular scheduled job.
+func (c *scheduledJobs) Get(name string) (result *batch.ScheduledJob, err error) {
+ result = &batch.ScheduledJob{}
+ err = c.r.Get().Namespace(c.ns).Resource("scheduledJobs").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new scheduled job.
+func (c *scheduledJobs) Create(job *batch.ScheduledJob) (result *batch.ScheduledJob, err error) {
+ result = &batch.ScheduledJob{}
+ err = c.r.Post().Namespace(c.ns).Resource("scheduledJobs").Body(job).Do().Into(result)
+ return
+}
+
+// Update updates an existing scheduled job.
+func (c *scheduledJobs) Update(job *batch.ScheduledJob) (result *batch.ScheduledJob, err error) {
+ result = &batch.ScheduledJob{}
+ err = c.r.Put().Namespace(c.ns).Resource("scheduledJobs").Name(job.Name).Body(job).Do().Into(result)
+ return
+}
+
+// Delete deletes a scheduled job, returns error if one occurs.
+func (c *scheduledJobs) Delete(name string, options *api.DeleteOptions) (err error) {
+ return c.r.Delete().Namespace(c.ns).Resource("scheduledJobs").Name(name).Body(options).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested scheduled jobs.
+func (c *scheduledJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("scheduledJobs").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// UpdateStatus takes the name of the scheduled job and the new status. Returns the server's representation of the scheduled job, and an error, if it occurs.
+func (c *scheduledJobs) UpdateStatus(job *batch.ScheduledJob) (result *batch.ScheduledJob, err error) {
+ result = &batch.ScheduledJob{}
+ err = c.r.Put().Namespace(c.ns).Resource("scheduledJobs").Name(job.Name).SubResource("status").Body(job).Do().Into(result)
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/secrets.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/secrets.go
new file mode 100644
index 0000000..bba3fd9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/secrets.go
@@ -0,0 +1,120 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+type SecretsNamespacer interface {
+ Secrets(namespace string) SecretsInterface
+}
+
+type SecretsInterface interface {
+ Create(secret *api.Secret) (*api.Secret, error)
+ Update(secret *api.Secret) (*api.Secret, error)
+ Delete(name string) error
+ List(opts api.ListOptions) (*api.SecretList, error)
+ Get(name string) (*api.Secret, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// events implements Secrets interface
+type secrets struct {
+ client *Client
+ namespace string
+}
+
+// newSecrets returns a new secrets object.
+func newSecrets(c *Client, ns string) *secrets {
+ return &secrets{
+ client: c,
+ namespace: ns,
+ }
+}
+
+func (s *secrets) Create(secret *api.Secret) (*api.Secret, error) {
+ result := &api.Secret{}
+ err := s.client.Post().
+ Namespace(s.namespace).
+ Resource("secrets").
+ Body(secret).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// List returns a list of secrets matching the selectors.
+func (s *secrets) List(opts api.ListOptions) (*api.SecretList, error) {
+ result := &api.SecretList{}
+
+ err := s.client.Get().
+ Namespace(s.namespace).
+ Resource("secrets").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// Get returns the given secret, or an error.
+func (s *secrets) Get(name string) (*api.Secret, error) {
+ result := &api.Secret{}
+ err := s.client.Get().
+ Namespace(s.namespace).
+ Resource("secrets").
+ Name(name).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// Watch starts watching for secrets matching the given selectors.
+func (s *secrets) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return s.client.Get().
+ Prefix("watch").
+ Namespace(s.namespace).
+ Resource("secrets").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+func (s *secrets) Delete(name string) error {
+ return s.client.Delete().
+ Namespace(s.namespace).
+ Resource("secrets").
+ Name(name).
+ Do().
+ Error()
+}
+
+func (s *secrets) Update(secret *api.Secret) (result *api.Secret, err error) {
+ result = &api.Secret{}
+ err = s.client.Put().
+ Namespace(s.namespace).
+ Resource("secrets").
+ Name(secret.Name).
+ Body(secret).
+ Do().
+ Into(result)
+
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/service_accounts.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/service_accounts.go
new file mode 100644
index 0000000..68d1b21
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/service_accounts.go
@@ -0,0 +1,120 @@
+/*
+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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+type ServiceAccountsNamespacer interface {
+ ServiceAccounts(namespace string) ServiceAccountsInterface
+}
+
+type ServiceAccountsInterface interface {
+ Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
+ Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
+ Delete(name string) error
+ List(opts api.ListOptions) (*api.ServiceAccountList, error)
+ Get(name string) (*api.ServiceAccount, error)
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// serviceAccounts implements ServiceAccounts interface
+type serviceAccounts struct {
+ client *Client
+ namespace string
+}
+
+// newServiceAccounts returns a new serviceAccounts object.
+func newServiceAccounts(c *Client, ns string) ServiceAccountsInterface {
+ return &serviceAccounts{
+ client: c,
+ namespace: ns,
+ }
+}
+
+func (s *serviceAccounts) Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error) {
+ result := &api.ServiceAccount{}
+ err := s.client.Post().
+ Namespace(s.namespace).
+ Resource("serviceAccounts").
+ Body(serviceAccount).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// List returns a list of serviceAccounts matching the selectors.
+func (s *serviceAccounts) List(opts api.ListOptions) (*api.ServiceAccountList, error) {
+ result := &api.ServiceAccountList{}
+
+ err := s.client.Get().
+ Namespace(s.namespace).
+ Resource("serviceAccounts").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// Get returns the given serviceAccount, or an error.
+func (s *serviceAccounts) Get(name string) (*api.ServiceAccount, error) {
+ result := &api.ServiceAccount{}
+ err := s.client.Get().
+ Namespace(s.namespace).
+ Resource("serviceAccounts").
+ Name(name).
+ Do().
+ Into(result)
+
+ return result, err
+}
+
+// Watch starts watching for serviceAccounts matching the given selectors.
+func (s *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return s.client.Get().
+ Prefix("watch").
+ Namespace(s.namespace).
+ Resource("serviceAccounts").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+func (s *serviceAccounts) Delete(name string) error {
+ return s.client.Delete().
+ Namespace(s.namespace).
+ Resource("serviceAccounts").
+ Name(name).
+ Do().
+ Error()
+}
+
+func (s *serviceAccounts) Update(serviceAccount *api.ServiceAccount) (result *api.ServiceAccount, err error) {
+ result = &api.ServiceAccount{}
+ err = s.client.Put().
+ Namespace(s.namespace).
+ Resource("serviceAccounts").
+ Name(serviceAccount.Name).
+ Body(serviceAccount).
+ Do().
+ Into(result)
+
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/services.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/services.go
new file mode 100644
index 0000000..aada5c1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/services.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 unversioned
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/util/net"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ServicesNamespacer has methods to work with Service resources in a namespace
+type ServicesNamespacer interface {
+ Services(namespace string) ServiceInterface
+}
+
+// ServiceInterface has methods to work with Service resources.
+type ServiceInterface interface {
+ List(opts api.ListOptions) (*api.ServiceList, error)
+ Get(name string) (*api.Service, error)
+ Create(srv *api.Service) (*api.Service, error)
+ Update(srv *api.Service) (*api.Service, error)
+ UpdateStatus(srv *api.Service) (*api.Service, error)
+ Delete(name string) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+ ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
+}
+
+// services implements ServicesNamespacer interface
+type services struct {
+ r *Client
+ ns string
+}
+
+// newServices returns a services
+func newServices(c *Client, namespace string) *services {
+ return &services{c, namespace}
+}
+
+// List takes a selector, and returns the list of services that match that selector
+func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) {
+ result = &api.ServiceList{}
+ err = c.r.Get().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&opts, api.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Get returns information about a particular service.
+func (c *services) Get(name string) (result *api.Service, err error) {
+ result = &api.Service{}
+ err = c.r.Get().Namespace(c.ns).Resource("services").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new service.
+func (c *services) Create(svc *api.Service) (result *api.Service, err error) {
+ result = &api.Service{}
+ err = c.r.Post().Namespace(c.ns).Resource("services").Body(svc).Do().Into(result)
+ return
+}
+
+// Update updates an existing service.
+func (c *services) Update(svc *api.Service) (result *api.Service, err error) {
+ result = &api.Service{}
+ err = c.r.Put().Namespace(c.ns).Resource("services").Name(svc.Name).Body(svc).Do().Into(result)
+ return
+}
+
+// UpdateStatus takes a Service object with the new status and applies it as an update to the existing Service.
+func (c *services) UpdateStatus(service *api.Service) (result *api.Service, err error) {
+ result = &api.Service{}
+ err = c.r.Put().Namespace(c.ns).Resource("services").Name(service.Name).SubResource("status").Body(service).Do().Into(result)
+ return
+}
+
+// Delete deletes an existing service.
+func (c *services) Delete(name string) error {
+ return c.r.Delete().Namespace(c.ns).Resource("services").Name(name).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested services.
+func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
+
+// 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.r.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/thirdpartyresources.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/thirdpartyresources.go
new file mode 100644
index 0000000..68adddb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/thirdpartyresources.go
@@ -0,0 +1,98 @@
+/*
+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
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// ThirdPartyResourceNamespacer has methods to work with ThirdPartyResource resources in a namespace
+type ThirdPartyResourceNamespacer interface {
+ ThirdPartyResources() ThirdPartyResourceInterface
+}
+
+type ThirdPartyResourceInterface interface {
+ List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error)
+ Get(name string) (*extensions.ThirdPartyResource, error)
+ Create(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
+ Update(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
+ UpdateStatus(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
+ Delete(name string) error
+ Watch(opts api.ListOptions) (watch.Interface, error)
+}
+
+// thirdPartyResources implements DaemonsSetsNamespacer interface
+type thirdPartyResources struct {
+ r *ExtensionsClient
+}
+
+func newThirdPartyResources(c *ExtensionsClient) *thirdPartyResources {
+ return &thirdPartyResources{c}
+}
+
+// Ensure statically that thirdPartyResources implements ThirdPartyResourcesInterface.
+var _ ThirdPartyResourceInterface = &thirdPartyResources{}
+
+func (c *thirdPartyResources) List(opts api.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
+ result = &extensions.ThirdPartyResourceList{}
+ err = c.r.Get().Resource("thirdpartyresources").VersionedParams(&opts, api.ParameterCodec).Do().Into(result)
+ return
+}
+
+// Get returns information about a particular third party resource.
+func (c *thirdPartyResources) Get(name string) (result *extensions.ThirdPartyResource, err error) {
+ result = &extensions.ThirdPartyResource{}
+ err = c.r.Get().Resource("thirdpartyresources").Name(name).Do().Into(result)
+ return
+}
+
+// Create creates a new third party resource.
+func (c *thirdPartyResources) Create(resource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
+ result = &extensions.ThirdPartyResource{}
+ err = c.r.Post().Resource("thirdpartyresources").Body(resource).Do().Into(result)
+ return
+}
+
+// Update updates an existing third party resource.
+func (c *thirdPartyResources) Update(resource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
+ result = &extensions.ThirdPartyResource{}
+ err = c.r.Put().Resource("thirdpartyresources").Name(resource.Name).Body(resource).Do().Into(result)
+ return
+}
+
+// UpdateStatus updates an existing third party resource status
+func (c *thirdPartyResources) UpdateStatus(resource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
+ result = &extensions.ThirdPartyResource{}
+ err = c.r.Put().Resource("thirdpartyresources").Name(resource.Name).SubResource("status").Body(resource).Do().Into(result)
+ return
+}
+
+// Delete deletes an existing third party resource.
+func (c *thirdPartyResources) Delete(name string) error {
+ return c.r.Delete().Resource("thirdpartyresources").Name(name).Do().Error()
+}
+
+// Watch returns a watch.Interface that watches the requested third party resources.
+func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) {
+ return c.r.Get().
+ Prefix("watch").
+ Resource("thirdpartyresources").
+ VersionedParams(&opts, api.ParameterCodec).
+ Watch()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/util.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/util.go
new file mode 100644
index 0000000..9657ff2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/client/unversioned/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 unversioned
+
+import (
+ "time"
+
+ "k8s.io/kubernetes/pkg/api/errors"
+ "k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/controller.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/controller.go
new file mode 100644
index 0000000..8cbd124
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/controller.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 framework
+
+import (
+ "sync"
+ "time"
+
+ "k8s.io/kubernetes/pkg/client/cache"
+ "k8s.io/kubernetes/pkg/runtime"
+ utilruntime "k8s.io/kubernetes/pkg/util/runtime"
+ "k8s.io/kubernetes/pkg/util/wait"
+)
+
+// Config contains all the settings for a Controller.
+type Config struct {
+ // The queue for your objects; either a cache.FIFO or
+ // a cache.DeltaFIFO. Your Process() function should accept
+ // the output of this Oueue's Pop() method.
+ cache.Queue
+
+ // Something that can list and watch your objects.
+ cache.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 cache.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
+
+ // 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
+}
+
+// ProcessFunc processes a single object.
+type ProcessFunc func(obj interface{}) error
+
+// Controller is a generic controller framework.
+type Controller struct {
+ config Config
+ reflector *cache.Reflector
+ reflectorMutex sync.RWMutex
+}
+
+// TODO make the "Controller" private, and convert all references to use ControllerInterface instead
+type ControllerInterface interface {
+ Run(stopCh <-chan struct{})
+ HasSynced() bool
+}
+
+// New makes a new Controller from the given Config.
+func New(c *Config) *Controller {
+ ctlr := &Controller{
+ config: *c,
+ }
+ 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()
+ r := cache.NewReflector(
+ c.config.ListerWatcher,
+ c.config.ObjectType,
+ c.config.Queue,
+ c.config.FullResyncPeriod,
+ )
+
+ 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()
+}
+
+// Requeue adds the provided object back into the queue if it does not already exist.
+func (c *Controller) Requeue(obj interface{}) error {
+ return c.config.Queue.AddIfNotPresent(cache.Deltas{
+ cache.Delta{
+ Type: cache.Sync,
+ Object: obj,
+ },
+ })
+}
+
+// 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.
+func (c *Controller) processLoop() {
+ for {
+ obj, err := c.config.Queue.Pop(cache.PopProcessFunc(c.config.Process))
+ if err != nil {
+ 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 cache.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)
+ }
+}
+
+// DeletionHandlingMetaNamespaceKeyFunc checks for
+// cache.DeletedFinalStateUnknown objects before calling
+// cache.MetaNamespaceKeyFunc.
+func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) {
+ if d, ok := obj.(cache.DeletedFinalStateUnknown); ok {
+ return d.Key, nil
+ }
+ return cache.MetaNamespaceKeyFunc(obj)
+}
+
+// NewInformer returns a cache.Store and a controller for populating the store
+// while also providing event notifications. You should only used the returned
+// cache.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 cache.ListerWatcher,
+ objType runtime.Object,
+ resyncPeriod time.Duration,
+ h ResourceEventHandler,
+) (cache.Store, *Controller) {
+ // This will hold the client state, as we know it.
+ clientState := cache.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 := cache.NewDeltaFIFO(cache.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.(cache.Deltas) {
+ switch d.Type {
+ case cache.Sync, cache.Added, cache.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 cache.Deleted:
+ if err := clientState.Delete(d.Object); err != nil {
+ return err
+ }
+ h.OnDelete(d.Object)
+ }
+ }
+ return nil
+ },
+ }
+ return clientState, New(cfg)
+}
+
+// NewIndexerInformer returns a cache.Indexer and a controller for populating the index
+// while also providing event notifications. You should only used the returned
+// cache.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.
+//
+func NewIndexerInformer(
+ lw cache.ListerWatcher,
+ objType runtime.Object,
+ resyncPeriod time.Duration,
+ h ResourceEventHandler,
+ indexers cache.Indexers,
+) (cache.Indexer, *Controller) {
+ // This will hold the client state, as we know it.
+ clientState := cache.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 := cache.NewDeltaFIFO(cache.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.(cache.Deltas) {
+ switch d.Type {
+ case cache.Sync, cache.Added, cache.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 cache.Deleted:
+ if err := clientState.Delete(d.Object); err != nil {
+ return err
+ }
+ h.OnDelete(d.Object)
+ }
+ }
+ return nil
+ },
+ }
+ return clientState, New(cfg)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/doc.go
new file mode 100644
index 0000000..feceba3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/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 framework implements all the grunt work involved in running a simple controller.
+package framework
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/fake_controller_source.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/fake_controller_source.go
new file mode 100644
index 0000000..ee00c05
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/fake_controller_source.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 framework
+
+import (
+ "errors"
+ "math/rand"
+ "strconv"
+ "sync"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/types"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+func NewFakeControllerSource() *FakeControllerSource {
+ return &FakeControllerSource{
+ Items: map[nnu]runtime.Object{},
+ Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
+ }
+}
+
+func NewFakePVControllerSource() *FakePVControllerSource {
+ return &FakePVControllerSource{
+ FakeControllerSource{
+ Items: map[nnu]runtime.Object{},
+ Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
+ }}
+}
+
+func NewFakePVCControllerSource() *FakePVCControllerSource {
+ return &FakePVCControllerSource{
+ FakeControllerSource{
+ Items: map[nnu]runtime.Object{},
+ Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
+ }}
+}
+
+// FakeControllerSource implements listing/watching for testing.
+type FakeControllerSource struct {
+ lock sync.RWMutex
+ Items map[nnu]runtime.Object
+ changes []watch.Event // one change per resourceVersion
+ Broadcaster *watch.Broadcaster
+}
+
+type FakePVControllerSource struct {
+ FakeControllerSource
+}
+
+type FakePVCControllerSource struct {
+ FakeControllerSource
+}
+
+// namespace, name, uid to be used as a key.
+type nnu struct {
+ namespace, name string
+ uid types.UID
+}
+
+// Add adds an object to the set and sends an add event to watchers.
+// obj's ResourceVersion is set.
+func (f *FakeControllerSource) Add(obj runtime.Object) {
+ f.Change(watch.Event{Type: watch.Added, Object: obj}, 1)
+}
+
+// Modify updates an object in the set and sends a modified event to watchers.
+// obj's ResourceVersion is set.
+func (f *FakeControllerSource) Modify(obj runtime.Object) {
+ f.Change(watch.Event{Type: watch.Modified, Object: obj}, 1)
+}
+
+// Delete deletes an object from the set and sends a delete event to watchers.
+// obj's ResourceVersion is set.
+func (f *FakeControllerSource) Delete(lastValue runtime.Object) {
+ f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 1)
+}
+
+// AddDropWatch adds an object to the set but forgets to send an add event to
+// watchers.
+// obj's ResourceVersion is set.
+func (f *FakeControllerSource) AddDropWatch(obj runtime.Object) {
+ f.Change(watch.Event{Type: watch.Added, Object: obj}, 0)
+}
+
+// ModifyDropWatch updates an object in the set but forgets to send a modify
+// event to watchers.
+// obj's ResourceVersion is set.
+func (f *FakeControllerSource) ModifyDropWatch(obj runtime.Object) {
+ f.Change(watch.Event{Type: watch.Modified, Object: obj}, 0)
+}
+
+// DeleteDropWatch deletes an object from the set but forgets to send a delete
+// event to watchers.
+// obj's ResourceVersion is set.
+func (f *FakeControllerSource) DeleteDropWatch(lastValue runtime.Object) {
+ f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 0)
+}
+
+func (f *FakeControllerSource) key(accessor meta.Object) nnu {
+ return nnu{accessor.GetNamespace(), accessor.GetName(), accessor.GetUID()}
+}
+
+// Change records the given event (setting the object's resource version) and
+// sends a watch event with the specified probability.
+func (f *FakeControllerSource) Change(e watch.Event, watchProbability float64) {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+
+ accessor, err := meta.Accessor(e.Object)
+ if err != nil {
+ panic(err) // this is test code only
+ }
+
+ resourceVersion := len(f.changes) + 1
+ accessor.SetResourceVersion(strconv.Itoa(resourceVersion))
+ f.changes = append(f.changes, e)
+ key := f.key(accessor)
+ switch e.Type {
+ case watch.Added, watch.Modified:
+ f.Items[key] = e.Object
+ case watch.Deleted:
+ delete(f.Items, key)
+ }
+
+ if rand.Float64() < watchProbability {
+ f.Broadcaster.Action(e.Type, e.Object)
+ }
+}
+
+func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) {
+ list := make([]runtime.Object, 0, len(f.Items))
+ for _, obj := range f.Items {
+ // Must make a copy to allow clients to modify the object.
+ // Otherwise, if they make a change and write it back, they
+ // will inadvertently change our canonical copy (in
+ // addition to racing with other clients).
+ objCopy, err := api.Scheme.DeepCopy(obj)
+ if err != nil {
+ return nil, err
+ }
+ list = append(list, objCopy.(runtime.Object))
+ }
+ return list, nil
+}
+
+// List returns a list object, with its resource version set.
+func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, error) {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ list, err := f.getListItemsLocked()
+ if err != nil {
+ return nil, err
+ }
+ listObj := &api.List{}
+ if err := meta.SetList(listObj, list); err != nil {
+ return nil, err
+ }
+ objMeta, err := api.ListMetaFor(listObj)
+ if err != nil {
+ return nil, err
+ }
+ resourceVersion := len(f.changes)
+ objMeta.ResourceVersion = strconv.Itoa(resourceVersion)
+ return listObj, nil
+}
+
+// List returns a list object, with its resource version set.
+func (f *FakePVControllerSource) List(options api.ListOptions) (runtime.Object, error) {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ list, err := f.FakeControllerSource.getListItemsLocked()
+ if err != nil {
+ return nil, err
+ }
+ listObj := &api.PersistentVolumeList{}
+ if err := meta.SetList(listObj, list); err != nil {
+ return nil, err
+ }
+ objMeta, err := api.ListMetaFor(listObj)
+ if err != nil {
+ return nil, err
+ }
+ resourceVersion := len(f.changes)
+ objMeta.ResourceVersion = strconv.Itoa(resourceVersion)
+ return listObj, nil
+}
+
+// List returns a list object, with its resource version set.
+func (f *FakePVCControllerSource) List(options api.ListOptions) (runtime.Object, error) {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ list, err := f.FakeControllerSource.getListItemsLocked()
+ if err != nil {
+ return nil, err
+ }
+ listObj := &api.PersistentVolumeClaimList{}
+ if err := meta.SetList(listObj, list); err != nil {
+ return nil, err
+ }
+ objMeta, err := api.ListMetaFor(listObj)
+ if err != nil {
+ return nil, err
+ }
+ resourceVersion := len(f.changes)
+ objMeta.ResourceVersion = strconv.Itoa(resourceVersion)
+ return listObj, nil
+}
+
+// Watch returns a watch, which will be pre-populated with all changes
+// after resourceVersion.
+func (f *FakeControllerSource) Watch(options api.ListOptions) (watch.Interface, error) {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ rc, err := strconv.Atoi(options.ResourceVersion)
+ if err != nil {
+ return nil, err
+ }
+ if rc < len(f.changes) {
+ changes := []watch.Event{}
+ for _, c := range f.changes[rc:] {
+ // Must make a copy to allow clients to modify the
+ // object. Otherwise, if they make a change and write
+ // it back, they will inadvertently change the our
+ // canonical copy (in addition to racing with other
+ // clients).
+ objCopy, err := api.Scheme.DeepCopy(c.Object)
+ if err != nil {
+ return nil, err
+ }
+ changes = append(changes, watch.Event{Type: c.Type, Object: objCopy.(runtime.Object)})
+ }
+ return f.Broadcaster.WatchWithPrefix(changes), nil
+ } else if rc > len(f.changes) {
+ return nil, errors.New("resource version in the future not supported by this fake")
+ }
+ return f.Broadcaster.Watch(), nil
+}
+
+// Shutdown closes the underlying broadcaster, waiting for events to be
+// delivered. It's an error to call any method after calling shutdown. This is
+// enforced by Shutdown() leaving f locked.
+func (f *FakeControllerSource) Shutdown() {
+ f.lock.Lock() // Purposely no unlock.
+ f.Broadcaster.Shutdown()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/shared_informer.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/shared_informer.go
new file mode 100644
index 0000000..87dcac6
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/controller/framework/shared_informer.go
@@ -0,0 +1,383 @@
+/*
+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 framework
+
+import (
+ "fmt"
+ "sync"
+ "time"
+
+ "k8s.io/kubernetes/pkg/client/cache"
+ "k8s.io/kubernetes/pkg/runtime"
+ utilruntime "k8s.io/kubernetes/pkg/util/runtime"
+)
+
+// 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 {
+ // events to a single handler are delivered sequentially, but there is no coordination between different handlers
+ // You may NOT add a handler *after* the SharedInformer is running. That will result in an error being returned.
+ // TODO we should try to remove this restriction eventually.
+ AddEventHandler(handler ResourceEventHandler) error
+ GetStore() cache.Store
+ // GetController gives back a synthetic interface that "votes" to start the informer
+ GetController() ControllerInterface
+ Run(stopCh <-chan struct{})
+ HasSynced() bool
+ LastSyncResourceVersion() string
+}
+
+type SharedIndexInformer interface {
+ SharedInformer
+ // AddIndexers add indexers to the informer before it starts.
+ AddIndexers(indexers cache.Indexers) error
+ GetIndexer() cache.Indexer
+}
+
+// NewSharedInformer creates a new instance for the listwatcher.
+// TODO: create a cache/factory of these at a higher level for the list all, watch all of a given resource that can
+// be shared amongst all consumers.
+func NewSharedInformer(lw cache.ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer {
+ return NewSharedIndexInformer(lw, objType, resyncPeriod, cache.Indexers{})
+}
+
+// NewSharedIndexInformer creates a new instance for the listwatcher.
+// TODO: create a cache/factory of these at a higher level for the list all, watch all of a given resource that can
+// be shared amongst all consumers.
+func NewSharedIndexInformer(lw cache.ListerWatcher, objType runtime.Object, resyncPeriod time.Duration, indexers cache.Indexers) SharedIndexInformer {
+ sharedIndexInformer := &sharedIndexInformer{
+ processor: &sharedProcessor{},
+ indexer: cache.NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers),
+ listerWatcher: lw,
+ objectType: objType,
+ fullResyncPeriod: resyncPeriod,
+ }
+ return sharedIndexInformer
+}
+
+type sharedIndexInformer struct {
+ indexer cache.Indexer
+ controller *Controller
+
+ processor *sharedProcessor
+
+ // This block is tracked to handle late initialization of the controller
+ listerWatcher cache.ListerWatcher
+ objectType runtime.Object
+ fullResyncPeriod time.Duration
+
+ 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 disonnected 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()
+}
+
+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 := cache.NewDeltaFIFO(cache.MetaNamespaceKeyFunc, nil, s.indexer)
+
+ cfg := &Config{
+ Queue: fifo,
+ ListerWatcher: s.listerWatcher,
+ ObjectType: s.objectType,
+ FullResyncPeriod: s.fullResyncPeriod,
+ RetryOnError: false,
+
+ Process: s.HandleDeltas,
+ }
+
+ func() {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ s.controller = New(cfg)
+ s.started = true
+ }()
+
+ s.stopCh = 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.reflector.LastSyncResourceVersion()
+}
+
+func (s *sharedIndexInformer) GetStore() cache.Store {
+ return s.indexer
+}
+
+func (s *sharedIndexInformer) GetIndexer() cache.Indexer {
+ return s.indexer
+}
+
+func (s *sharedIndexInformer) AddIndexers(indexers cache.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() ControllerInterface {
+ return &dummyController{informer: s}
+}
+
+func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) error {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ if !s.started {
+ listener := newProcessListener(handler)
+ s.processor.listeners = append(s.processor.listeners, listener)
+ return nil
+ }
+
+ // 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()
+
+ listener := newProcessListener(handler)
+ s.processor.listeners = append(s.processor.listeners, 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]})
+ }
+
+ return nil
+}
+
+func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error {
+ s.blockDeltas.Lock()
+ defer s.blockDeltas.Unlock()
+
+ // from oldest to newest
+ for _, d := range obj.(cache.Deltas) {
+ switch d.Type {
+ case cache.Sync, cache.Added, cache.Updated:
+ 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})
+ } else {
+ if err := s.indexer.Add(d.Object); err != nil {
+ return err
+ }
+ s.processor.distribute(addNotification{newObj: d.Object})
+ }
+ case cache.Deleted:
+ if err := s.indexer.Delete(d.Object); err != nil {
+ return err
+ }
+ s.processor.distribute(deleteNotification{oldObj: d.Object})
+ }
+ }
+ return nil
+}
+
+type sharedProcessor struct {
+ listeners []*processorListener
+}
+
+func (p *sharedProcessor) distribute(obj interface{}) {
+ for _, listener := range p.listeners {
+ listener.add(obj)
+ }
+}
+
+func (p *sharedProcessor) run(stopCh <-chan struct{}) {
+ for _, listener := range p.listeners {
+ go listener.run(stopCh)
+ go listener.pop(stopCh)
+ }
+}
+
+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
+}
+
+func newProcessListener(handler ResourceEventHandler) *processorListener {
+ ret := &processorListener{
+ pendingNotifications: []interface{}{},
+ nextCh: make(chan interface{}),
+ handler: handler,
+ }
+
+ ret.cond.L = &ret.lock
+ 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))
+ }
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS
new file mode 100644
index 0000000..a046efc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS
@@ -0,0 +1,5 @@
+assignees:
+ - derekwaynecarr
+ - lavalamp
+ - smarterclayton
+ - wojtek-t
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/cloner.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/cloner.go
new file mode 100644
index 0000000..e4e74f6
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/cloner.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 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]reflect.Value
+}
+
+// NewCloner creates a new Cloner object.
+func NewCloner() *Cloner {
+ c := &Cloner{
+ deepCopyFuncs: map[reflect.Type]reflect.Value{},
+ generatedDeepCopyFuncs: map[reflect.Type]reflect.Value{},
+ }
+ 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(1).Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'in' param 1, got: %v", ft)
+ }
+ if ft.In(1).Elem() != 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
+}
+
+// Similar to RegisterDeepCopyFunc, but registers deep copy function that were
+// automatically generated.
+func (c *Cloner) RegisterGeneratedDeepCopyFunc(deepCopyFunc interface{}) error {
+ fv := reflect.ValueOf(deepCopyFunc)
+ ft := fv.Type()
+ if err := verifyDeepCopyFunctionSignature(ft); err != nil {
+ return err
+ }
+ c.generatedDeepCopyFuncs[ft.In(0)] = fv
+ 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()
+
+ if fv, ok := c.deepCopyFuncs[inType]; ok {
+ return c.customDeepCopy(src, fv)
+ }
+ if fv, ok := c.generatedDeepCopyFuncs[inType]; ok {
+ return c.customDeepCopy(src, fv)
+ }
+ return c.defaultDeepCopy(src)
+}
+
+func (c *Cloner) customDeepCopy(src, fv reflect.Value) (reflect.Value, error) {
+ outValue := reflect.New(src.Type())
+ 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.Elem(), nil
+ }
+ return outValue.Elem(), 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/converter.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/converter.go
new file mode 100644
index 0000000..7a18d63
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/converter.go
@@ -0,0 +1,951 @@
+/*
+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 a type to a function which applies defaults.
+ defaultingFuncs map[reflect.Type]reflect.Value
+
+ // Similar to above, but function is stored as interface{}.
+ defaultingInterfaces map[reflect.Type]interface{}
+
+ // 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{}),
+ defaultingFuncs: make(map[reflect.Type]reflect.Value),
+ defaultingInterfaces: make(map[reflect.Type]interface{}),
+ 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
+
+ // If registered, returns a function applying defaults for objects of a given type.
+ // Used for automatically generating conversion functions.
+ DefaultingInterface(inType reflect.Type) (interface{}, bool)
+
+ // 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
+}
+
+// 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
+}
+
+func (s *scope) DefaultingInterface(inType reflect.Type) (interface{}, bool) {
+ value, found := s.converter.defaultingInterfaces[inType]
+ return value, found
+}
+
+// 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
+}
+
+// RegisterDefaultingFunc registers a value-defaulting func with the Converter.
+// defaultingFunc must take one parameters: a pointer to the input type.
+//
+// Example:
+// c.RegisteDefaultingFunc(
+// func(in *v1.Pod) {
+// // defaulting logic...
+// })
+func (c *Converter) RegisterDefaultingFunc(defaultingFunc interface{}) error {
+ fv := reflect.ValueOf(defaultingFunc)
+ ft := fv.Type()
+ if ft.Kind() != reflect.Func {
+ return fmt.Errorf("expected func, got: %v", ft)
+ }
+ if ft.NumIn() != 1 {
+ return fmt.Errorf("expected one 'in' param, got: %v", ft)
+ }
+ if ft.NumOut() != 0 {
+ return fmt.Errorf("expected zero 'out' params, got: %v", ft)
+ }
+ if ft.In(0).Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft)
+ }
+ inType := ft.In(0).Elem()
+ c.defaultingFuncs[inType] = fv
+ c.defaultingInterfaces[inType] = defaultingFunc
+ 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()
+ // Apply default values.
+ if fv, ok := c.defaultingFuncs[st]; ok {
+ if c.Debug != nil {
+ c.Debug.Logf("Applying defaults for '%v'", st)
+ }
+ args := []reflect.Value{sv.Addr()}
+ fv.Call(args)
+ }
+
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go
new file mode 100644
index 0000000..6bfc870
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/doc.go
new file mode 100644
index 0000000..0c46ef2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/helper.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/helper.go
new file mode 100644
index 0000000..4ebc1eb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert.go
new file mode 100644
index 0000000..30f717b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go
new file mode 100644
index 0000000..4c1002a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/doc.go
new file mode 100644
index 0000000..49059e2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/fields.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/fields.go
new file mode 100644
index 0000000..623b27e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/selector.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/selector.go
new file mode 100644
index 0000000..eef44d3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/fields/selector.go
@@ -0,0 +1,247 @@
+/*
+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 (
+ "fmt"
+ "sort"
+ "strings"
+)
+
+// 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.
+ Transform(fn TransformFunc) (Selector, error)
+
+ // 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
+ }
+ return &hasTerm{field, value}, nil
+}
+
+func (t *hasTerm) String() string {
+ return fmt.Sprintf("%v=%v", t.field, 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
+ }
+ return &notHasTerm{field, value}, nil
+}
+
+func (t *notHasTerm) String() string {
+ return fmt.Sprintf("%v!=%v", t.field, 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, len([]Selector(t)))
+ for i, s := range []Selector(t) {
+ n, err := s.Transform(fn)
+ if err != nil {
+ return nil, err
+ }
+ next[i] = n
+ }
+ return andTerm(next), nil
+}
+
+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)
+}
+
+// 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
+ })
+}
+
+// Parses the selector and runs them through the given TransformFunc.
+func ParseAndTransformSelector(selector string, fn TransformFunc) (Selector, error) {
+ return parseSelector(selector, fn)
+}
+
+// Function to transform selectors.
+type TransformFunc func(field, value string) (newField, newValue string, err error)
+
+func try(selectorPiece, op string) (lhs, rhs string, ok bool) {
+ pieces := strings.Split(selectorPiece, op)
+ if len(pieces) == 2 {
+ return pieces[0], pieces[1], true
+ }
+ return "", "", false
+}
+
+func parseSelector(selector string, fn TransformFunc) (Selector, error) {
+ parts := strings.Split(selector, ",")
+ sort.StringSlice(parts).Sort()
+ var items []Selector
+ for _, part := range parts {
+ if part == "" {
+ continue
+ }
+ if lhs, rhs, ok := try(part, "!="); ok {
+ items = append(items, &notHasTerm{field: lhs, value: rhs})
+ } else if lhs, rhs, ok := try(part, "=="); ok {
+ items = append(items, &hasTerm{field: lhs, value: rhs})
+ } else if lhs, rhs, ok := try(part, "="); ok {
+ items = append(items, &hasTerm{field: lhs, value: rhs})
+ } else {
+ 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}
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go
new file mode 100644
index 0000000..ebc1cc5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.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 qos contains helper functions for quality of service.
+// For each resource (memory, CPU) Kubelet supports three classes of containers.
+// Memory guaranteed containers will receive the highest priority and will get all the resources
+// they need.
+// Burstable containers will be guaranteed their request and can “burst” and use more resources
+// when available.
+// Best-Effort containers, which don’t specify a request, can use resources only if not being used
+// by other pods.
+package qos
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy.go
new file mode 100644
index 0000000..ad696f3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy.go
@@ -0,0 +1,66 @@
+/*
+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 qos
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+)
+
+const (
+ PodInfraOOMAdj int = -999
+ KubeletOOMScoreAdj int = -999
+ KubeProxyOOMScoreAdj int = -999
+ guaranteedOOMScoreAdj int = -998
+ besteffortOOMScoreAdj int = 1000
+)
+
+// GetContainerOOMAdjust returns the amount by which the OOM score of all processes in the
+// container should be adjusted.
+// The OOM score of a process is the percentage of memory it consumes
+// multiplied by 10 (barring exceptional cases) + a configurable quantity which is between -1000
+// and 1000. Containers with higher OOM scores are killed if the system runs out of memory.
+// See https://lwn.net/Articles/391222/ for more information.
+func GetContainerOOMScoreAdjust(pod *api.Pod, container *api.Container, memoryCapacity int64) int {
+ switch GetPodQOS(pod) {
+ case Guaranteed:
+ // Guaranteed containers should be the last to get killed.
+ return guaranteedOOMScoreAdj
+ case BestEffort:
+ return besteffortOOMScoreAdj
+ }
+
+ // Burstable containers are a middle tier, between Guaranteed and Best-Effort. Ideally,
+ // we want to protect Burstable containers that consume less memory than requested.
+ // The formula below is a heuristic. A container requesting for 10% of a system's
+ // memory will have an OOM score adjust of 900. If a process in container Y
+ // uses over 10% of memory, its OOM score will be 1000. The idea is that containers
+ // which use more than their request will have an OOM score of 1000 and will be prime
+ // targets for OOM kills.
+ // Note that this is a heuristic, it won't work if a container has many small processes.
+ memoryRequest := container.Resources.Requests.Memory().Value()
+ oomScoreAdjust := 1000 - (1000*memoryRequest)/memoryCapacity
+ // A guaranteed pod using 100% of memory can have an OOM score of 1. Ensure
+ // that burstable pods have a higher OOM score adjustment.
+ if oomScoreAdjust < 2 {
+ return 2
+ }
+ // Give burstable pods a higher chance of survival over besteffort pods.
+ if int(oomScoreAdjust) == besteffortOOMScoreAdj {
+ return int(oomScoreAdjust - 1)
+ }
+ return int(oomScoreAdjust)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos.go
new file mode 100644
index 0000000..2c0d19d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos.go
@@ -0,0 +1,140 @@
+/*
+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 qos
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/resource"
+)
+
+// isResourceGuaranteed returns true if the container's resource requirements are Guaranteed.
+func isResourceGuaranteed(container *api.Container, resource api.ResourceName) bool {
+ // A container resource is guaranteed if its request == limit.
+ // If request == limit, the user is very confident of resource consumption.
+ req, hasReq := container.Resources.Requests[resource]
+ limit, hasLimit := container.Resources.Limits[resource]
+ if !hasReq || !hasLimit {
+ return false
+ }
+ return req.Cmp(limit) == 0 && req.Value() != 0
+}
+
+// isResourceBestEffort returns true if the container's resource requirements are best-effort.
+func isResourceBestEffort(container *api.Container, resource api.ResourceName) bool {
+ // A container resource is best-effort if its request is unspecified or 0.
+ // If a request is specified, then the user expects some kind of resource guarantee.
+ req, hasReq := container.Resources.Requests[resource]
+ return !hasReq || req.Value() == 0
+}
+
+// GetPodQOS returns the QoS class of a pod.
+// A pod is besteffort if none of its containers have specified any requests or limits.
+// A pod is guaranteed only when requests and limits are specified for all the containers and they are equal.
+// A pod is burstable if limits and requests do not match across all containers.
+func GetPodQOS(pod *api.Pod) QOSClass {
+ requests := api.ResourceList{}
+ limits := api.ResourceList{}
+ zeroQuantity := resource.MustParse("0")
+ isGuaranteed := true
+ for _, container := range pod.Spec.Containers {
+ // process requests
+ for name, quantity := range container.Resources.Requests {
+ if quantity.Cmp(zeroQuantity) == 1 {
+ delta := quantity.Copy()
+ if _, exists := requests[name]; !exists {
+ requests[name] = *delta
+ } else {
+ delta.Add(requests[name])
+ requests[name] = *delta
+ }
+ }
+ }
+ // process limits
+ for name, quantity := range container.Resources.Limits {
+ if quantity.Cmp(zeroQuantity) == 1 {
+ delta := quantity.Copy()
+ if _, exists := limits[name]; !exists {
+ limits[name] = *delta
+ } else {
+ delta.Add(limits[name])
+ limits[name] = *delta
+ }
+ }
+ }
+ if len(container.Resources.Limits) != len(supportedComputeResources) {
+ isGuaranteed = false
+ }
+ }
+ if len(requests) == 0 && len(limits) == 0 {
+ return BestEffort
+ }
+ // Check is requests match limits for all resources.
+ if isGuaranteed {
+ for name, req := range requests {
+ if lim, exists := limits[name]; !exists || lim.Cmp(req) != 0 {
+ isGuaranteed = false
+ break
+ }
+ }
+ }
+ if isGuaranteed &&
+ len(requests) == len(limits) &&
+ len(limits) == len(supportedComputeResources) {
+ return Guaranteed
+ }
+ return Burstable
+}
+
+// QOSList is a set of (resource name, QoS class) pairs.
+type QOSList map[api.ResourceName]QOSClass
+
+// GetQOS returns a mapping of resource name to QoS class of a container
+func GetQOS(container *api.Container) QOSList {
+ resourceToQOS := QOSList{}
+ for resource := range allResources(container) {
+ switch {
+ case isResourceGuaranteed(container, resource):
+ resourceToQOS[resource] = Guaranteed
+ case isResourceBestEffort(container, resource):
+ resourceToQOS[resource] = BestEffort
+ default:
+ resourceToQOS[resource] = Burstable
+ }
+ }
+ return resourceToQOS
+}
+
+// supportedComputeResources is the list of supported compute resources
+var supportedComputeResources = []api.ResourceName{
+ api.ResourceCPU,
+ api.ResourceMemory,
+}
+
+// allResources returns a set of all possible resources whose mapped key value is true if present on the container
+func allResources(container *api.Container) map[api.ResourceName]bool {
+ resources := map[api.ResourceName]bool{}
+ for _, resource := range supportedComputeResources {
+ resources[resource] = false
+ }
+ for resource := range container.Resources.Requests {
+ resources[resource] = true
+ }
+ for resource := range container.Resources.Limits {
+ resources[resource] = true
+ }
+ return resources
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/types.go
new file mode 100644
index 0000000..e52dece
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/kubelet/qos/types.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 qos
+
+// QOSClass defines the supported qos classes of Pods/Containers.
+type QOSClass string
+
+const (
+ // Guaranteed is the Guaranteed qos class.
+ Guaranteed QOSClass = "Guaranteed"
+ // Burstable is the Burstable qos class.
+ Burstable QOSClass = "Burstable"
+ // BestEffort is the BestEffort qos class.
+ BestEffort QOSClass = "BestEffort"
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/doc.go
new file mode 100644
index 0000000..35ba788
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/labels.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/labels.go
new file mode 100644
index 0000000..637a45f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/labels.go
@@ -0,0 +1,71 @@
+/*
+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 (
+ "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)
+}
+
+// FormatLables convert label map into plain string
+func FormatLabels(labelMap map[string]string) string {
+ l := Set(labelMap).String()
+ if l == "" {
+ l = "<none>"
+ }
+ return l
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/selector.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/selector.go
new file mode 100644
index 0000000..861b6ea
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/labels/selector.go
@@ -0,0 +1,810 @@
+/*
+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/kubernetes/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/util/validation"
+)
+
+// 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
+}
+
+// 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 "<null>" }
+func (n nothingSelector) Add(_ ...Requirement) Selector { return n }
+
+// Nothing returns a selector that matches no labels
+func Nothing() Selector {
+ return nothingSelector{}
+}
+
+// Operator represents a key's relationship
+// to a set of values in a Requirement.
+type Operator string
+
+const (
+ DoesNotExistOperator Operator = "!"
+ EqualsOperator Operator = "="
+ DoubleEqualsOperator Operator = "=="
+ InOperator Operator = "in"
+ NotEqualsOperator Operator = "!="
+ NotInOperator Operator = "notin"
+ ExistsOperator Operator = "exists"
+ GreaterThanOperator Operator = "gt"
+ LessThanOperator Operator = "lt"
+)
+
+func NewSelector() Selector {
+ return internalSelector(nil)
+}
+
+type internalSelector []Requirement
+
+// Sort by key to obtain determisitic 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 is a selector that 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 is initialized via NewRequirement constructor for creating a valid Requirement.
+type Requirement struct {
+ key string
+ operator Operator
+ strValues sets.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 Operator, vals sets.String) (*Requirement, error) {
+ if err := validateLabelKey(key); err != nil {
+ return nil, err
+ }
+ switch op {
+ case InOperator, NotInOperator:
+ if len(vals) == 0 {
+ return nil, fmt.Errorf("for 'in', 'notin' operators, values set can't be empty")
+ }
+ case EqualsOperator, DoubleEqualsOperator, NotEqualsOperator:
+ if len(vals) != 1 {
+ return nil, fmt.Errorf("exact-match compatibility requires one single value")
+ }
+ case ExistsOperator, DoesNotExistOperator:
+ if len(vals) != 0 {
+ return nil, fmt.Errorf("values set must be empty for exists and does not exist")
+ }
+ case GreaterThanOperator, LessThanOperator:
+ if len(vals) != 1 {
+ return nil, fmt.Errorf("for 'Gt', 'Lt' operators, exactly one value is required")
+ }
+ for val := range vals {
+ if _, err := strconv.ParseInt(val, 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 v := range vals {
+ if err := validateLabelValue(v); err != nil {
+ return nil, err
+ }
+ }
+ return &Requirement{key: key, operator: op, strValues: vals}, nil
+}
+
+// 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 InOperator, EqualsOperator, DoubleEqualsOperator:
+ if !ls.Has(r.key) {
+ return false
+ }
+ return r.strValues.Has(ls.Get(r.key))
+ case NotInOperator, NotEqualsOperator:
+ if !ls.Has(r.key) {
+ return true
+ }
+ return !r.strValues.Has(ls.Get(r.key))
+ case ExistsOperator:
+ return ls.Has(r.key)
+ case DoesNotExistOperator:
+ return !ls.Has(r.key)
+ case GreaterThanOperator, LessThanOperator:
+ 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 strValue := range r.strValues {
+ rValue, err = strconv.ParseInt(strValue, 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", strValue, r)
+ return false
+ }
+ }
+ return (r.operator == GreaterThanOperator && lsValue > rValue) || (r.operator == LessThanOperator && lsValue < rValue)
+ default:
+ return false
+ }
+}
+
+func (r *Requirement) Key() string {
+ return r.key
+}
+func (r *Requirement) Operator() Operator {
+ return r.operator
+}
+func (r *Requirement) Values() sets.String {
+ ret := sets.String{}
+ for k := range r.strValues {
+ ret.Insert(k)
+ }
+ return ret
+}
+
+// Return 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 == DoesNotExistOperator {
+ buffer.WriteString("!")
+ }
+ buffer.WriteString(r.key)
+
+ switch r.operator {
+ case EqualsOperator:
+ buffer.WriteString("=")
+ case DoubleEqualsOperator:
+ buffer.WriteString("==")
+ case NotEqualsOperator:
+ buffer.WriteString("!=")
+ case InOperator:
+ buffer.WriteString(" in ")
+ case NotInOperator:
+ buffer.WriteString(" notin ")
+ case GreaterThanOperator:
+ buffer.WriteString(">")
+ case LessThanOperator:
+ buffer.WriteString("<")
+ case ExistsOperator, DoesNotExistOperator:
+ return buffer.String()
+ }
+
+ switch r.operator {
+ case InOperator, NotInOperator:
+ buffer.WriteString("(")
+ }
+ if len(r.strValues) == 1 {
+ buffer.WriteString(r.strValues.List()[0])
+ } else { // only > 1 since == 0 prohibited by NewRequirement
+ buffer.WriteString(strings.Join(r.strValues.List(), ","))
+ }
+
+ switch r.operator {
+ case InOperator, NotInOperator:
+ 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
+}
+
+// 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, ",")
+}
+
+// constants definition for lexer token
+type Token int
+
+const (
+ ErrorToken Token = iota
+ EndOfStringToken
+ ClosedParToken
+ CommaToken
+ DoesNotExistToken
+ DoubleEqualsToken
+ EqualsToken
+ GreaterThanToken
+ IdentifierToken // to represent keys and values
+ InToken
+ LessThanToken
+ NotEqualsToken
+ NotInToken
+ 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,
+}
+
+// The item produced by the lexer. It contains the Token and the literal.
+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
+}
+
+// Parser context 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 ParserContext = iota
+ 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 == ExistsOperator || operator == DoesNotExistOperator { // operator found lookahead set checked
+ return NewRequirement(key, operator, nil)
+ }
+ operator, err = p.parseOperator()
+ if err != nil {
+ return nil, err
+ }
+ var values sets.String
+ switch operator {
+ case InOperator, NotInOperator:
+ values, err = p.parseValues()
+ case EqualsOperator, DoubleEqualsOperator, NotEqualsOperator, GreaterThanOperator, LessThanOperator:
+ values, err = p.parseExactValue()
+ }
+ if err != nil {
+ return nil, err
+ }
+ return NewRequirement(key, operator, values)
+
+}
+
+// parseKeyAndInferOperator parse literals.
+// in case of no operator '!, in, notin, ==, =, !=' are found
+// the 'exists' operator is inferred
+func (p *Parser) parseKeyAndInferOperator() (string, Operator, error) {
+ var operator Operator
+ tok, literal := p.consume(Values)
+ if tok == DoesNotExistToken {
+ operator = DoesNotExistOperator
+ 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 != DoesNotExistOperator {
+ operator = ExistsOperator
+ }
+ }
+ return literal, operator, nil
+}
+
+// parseOperator return operator and eventually matchType
+// matchType can be exact
+func (p *Parser) parseOperator() (op 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 = InOperator
+ case EqualsToken:
+ op = EqualsOperator
+ case DoubleEqualsToken:
+ op = DoubleEqualsOperator
+ case GreaterThanToken:
+ op = GreaterThanOperator
+ case LessThanToken:
+ op = LessThanOperator
+ case NotInToken:
+ op = NotInOperator
+ case NotEqualsToken:
+ op = NotEqualsOperator
+ 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 {
+ return internalSelector{}
+ }
+ var requirements internalSelector
+ for label, value := range ls {
+ if r, err := NewRequirement(label, EqualsOperator, sets.NewString(value)); err != nil {
+ //TODO: double check errors when input comes from serialization?
+ return internalSelector{}
+ } else {
+ requirements = append(requirements, *r)
+ }
+ }
+ // sort to have deterministic string representation
+ sort.Sort(ByKey(requirements))
+ return internalSelector(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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/doc.go
new file mode 100644
index 0000000..a2a0021
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/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 ports defines ports used by various pieces of the kubernetes
+// infrastructure.
+package ports
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go
new file mode 100644
index 0000000..9c597ba
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go
@@ -0,0 +1,40 @@
+/*
+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 ports
+
+const (
+ // ProxyPort is the default port for the proxy healthz server.
+ // May be overridden by a flag at startup.
+ ProxyStatusPort = 10249
+ // KubeletPort is the default port for the kubelet server on each host machine.
+ // May be overridden by a flag at startup.
+ KubeletPort = 10250
+ // SchedulerPort is the default port for the scheduler status server.
+ // May be overridden by a flag at startup.
+ SchedulerPort = 10251
+ // ControllerManagerPort is the default port for the controller manager status server.
+ // May be overridden by a flag at startup.
+ ControllerManagerPort = 10252
+ // Port for flannel daemon.
+ FlannelDaemonPort = 10253
+ // KubeletReadOnlyPort exposes basic read-only services from the kubelet.
+ // May be overridden by a flag at startup.
+ // This is necessary for heapster to collect monitoring stats from the kubelet
+ // until heapster can transition to using the SSL endpoint.
+ // TODO(roberthbailey): Remove this once we have a better solution for heapster.
+ KubeletReadOnlyPort = 10255
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS
new file mode 100644
index 0000000..d038b5e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS
@@ -0,0 +1,5 @@
+assignees:
+ - caesarxuchao
+ - deads2k
+ - lavalamp
+ - smarterclayton
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec.go
new file mode 100644
index 0000000..3f7681c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec.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 runtime
+
+import (
+ "bytes"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "net/url"
+ "reflect"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion/queryparams"
+)
+
+// 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)
+}
+
+// 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 unversioned.GroupVersionKind, obj Object) (Object, error) {
+ if obj != nil {
+ into, _, err := t.ObjectKinds(obj)
+ if err != nil {
+ return nil, err
+ }
+ if gvk == into[0] {
+ 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 *unversioned.GroupVersionKind, into Object) (Object, *unversioned.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 unversioned.GroupVersion, into Object) error {
+ if len(parameters) == 0 {
+ return nil
+ }
+ targetGVKs, _, err := c.typer.ObjectKinds(into)
+ if err != nil {
+ return err
+ }
+ targetGVK := targetGVKs[0]
+ if targetGVK.GroupVersion() == from {
+ return c.convertor.Convert(&parameters, into)
+ }
+ input, err := c.creator.New(from.WithKind(targetGVK.Kind))
+ if err != nil {
+ return err
+ }
+ if err := c.convertor.Convert(&parameters, input); err != nil {
+ return err
+ }
+ return c.convertor.Convert(input, into)
+}
+
+// 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 unversioned.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 {
+ Serializer
+}
+
+func NewBase64Serializer(s Serializer) Serializer {
+ return &base64Serializer{s}
+}
+
+func (s base64Serializer) Encode(obj Object, stream io.Writer) error {
+ e := base64.NewEncoder(base64.StdEncoding, stream)
+ err := s.Serializer.Encode(obj, e)
+ e.Close()
+ return err
+}
+
+func (s base64Serializer) Decode(data []byte, defaults *unversioned.GroupVersionKind, into Object) (Object, *unversioned.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.Serializer.Decode(out[:n], defaults, into)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go
new file mode 100644
index 0000000..b012696
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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/kubernetes/pkg/api/unversioned"
+)
+
+// 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 ...unversioned.GroupVersionKind) error {
+ _, err := Encode(c, internalType)
+ if 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)
+ }
+ err = DecodeInto(c, exBytes, internalType)
+ if err != nil {
+ return fmt.Errorf("external type %s not convertable to internal type: %v", et, err)
+ }
+ }
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/conversion.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/conversion.go
new file mode 100644
index 0000000..dd6e26a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/deep_copy_generated.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/deep_copy_generated.go
new file mode 100644
index 0000000..6f5f613
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/deep_copy_generated.go
@@ -0,0 +1,63 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/kubernetes/pkg/conversion"
+)
+
+func DeepCopy_runtime_RawExtension(in RawExtension, out *RawExtension, c *conversion.Cloner) error {
+ if in.Raw != nil {
+ in, out := in.Raw, &out.Raw
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Raw = nil
+ }
+ if in.Object == nil {
+ out.Object = nil
+ } else if newVal, err := c.DeepCopy(in.Object); err != nil {
+ return err
+ } else {
+ out.Object = newVal.(Object)
+ }
+ return nil
+}
+
+func DeepCopy_runtime_TypeMeta(in TypeMeta, out *TypeMeta, c *conversion.Cloner) error {
+ out.APIVersion = in.APIVersion
+ out.Kind = in.Kind
+ return nil
+}
+
+func DeepCopy_runtime_Unknown(in Unknown, out *Unknown, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if in.Raw != nil {
+ in, out := in.Raw, &out.Raw
+ *out = make([]byte, len(in))
+ copy(*out, in)
+ } else {
+ out.Raw = nil
+ }
+ out.ContentEncoding = in.ContentEncoding
+ out.ContentType = in.ContentType
+ return nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/doc.go
new file mode 100644
index 0000000..a9d084d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/embedded.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/embedded.go
new file mode 100644
index 0000000..eb1f573
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+)
+
+type encodable struct {
+ E Encoder `json:"-"`
+ obj Object
+ versions []unversioned.GroupVersion
+}
+
+func (e encodable) GetObjectKind() unversioned.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 ...unversioned.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 ...unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/error.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/error.go
new file mode 100644
index 0000000..4041b4d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/error.go
@@ -0,0 +1,102 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+)
+
+type notRegisteredErr struct {
+ gvk unversioned.GroupVersionKind
+ t reflect.Type
+}
+
+// NewNotRegisteredErr is exposed for testing.
+func NewNotRegisteredErr(gvk unversioned.GroupVersionKind, t reflect.Type) error {
+ return &notRegisteredErr{gvk: gvk, t: t}
+}
+
+func (k *notRegisteredErr) Error() string {
+ 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 'Versioj' 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/extension.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/extension.go
new file mode 100644
index 0000000..4d23ee9
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go
new file mode 100644
index 0000000..889dbfb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go
@@ -0,0 +1,689 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/runtime/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package runtime is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/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 io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *RawExtension) Reset() { *m = RawExtension{} }
+func (m *RawExtension) String() string { return proto.CompactTextString(m) }
+func (*RawExtension) ProtoMessage() {}
+
+func (m *TypeMeta) Reset() { *m = TypeMeta{} }
+func (m *TypeMeta) String() string { return proto.CompactTextString(m) }
+func (*TypeMeta) ProtoMessage() {}
+
+func (m *Unknown) Reset() { *m = Unknown{} }
+func (m *Unknown) String() string { return proto.CompactTextString(m) }
+func (*Unknown) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*RawExtension)(nil), "k8s.io.kubernetes.pkg.runtime.RawExtension")
+ proto.RegisterType((*TypeMeta)(nil), "k8s.io.kubernetes.pkg.runtime.TypeMeta")
+ proto.RegisterType((*Unknown)(nil), "k8s.io.kubernetes.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 (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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto
new file mode 100644
index 0000000..0e602ab
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto
@@ -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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.runtime;
+
+import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/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
+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 *unversioned.GroupVersionKind) { unversioned.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
+message TypeMeta {
+ optional string apiVersion = 1;
+
+ 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
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/helper.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/helper.go
new file mode 100644
index 0000000..827cff1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/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 unversioned.GroupVersion) (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 []unversioned.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 unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go
new file mode 100644
index 0000000..e463246
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go
@@ -0,0 +1,217 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+)
+
+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"
+)
+
+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
+}
+
+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 *unversioned.GroupVersionKind, into Object) (Object, *unversioned.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 unversioned.GroupVersion, into Object) error
+ // EncodeParameters encodes the provided object as query parameters or returns an error.
+ EncodeParameters(obj Object, to unversioned.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 {
+ Serializer
+ // EncodesAsText indicates this serializer can be encoded to UTF-8 safely.
+ EncodesAsText bool
+ // MediaType is the value that represents this serializer over the wire.
+ MediaType string
+}
+
+// StreamSerializerInfo contains information about a specific stream serialization format
+type StreamSerializerInfo struct {
+ SerializerInfo
+ // Framer is the factory for retrieving streams that separate objects on the wire
+ Framer
+ // Embedded is the type of the nested serialization that should be used.
+ Embedded SerializerInfo
+}
+
+// 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() []string
+ // SerializerForMediaType returns a serializer for the provided media type. params is the set of
+ // parameters applied to the media type that may modify the resulting output. ok will be false
+ // if no serializer matched the media type.
+ SerializerForMediaType(mediaType string, params map[string]string) (s SerializerInfo, ok bool)
+
+ // SupportedStreamingMediaTypes returns the media types of the supported streaming serializers.
+ // Streaming serializers control how multiple objects are written to a stream output.
+ SupportedStreamingMediaTypes() []string
+ // StreamingSerializerForMediaType returns a serializer for the provided media type that supports
+ // reading and writing multiple objects to a stream. It returns a framer and serializer, or an
+ // error if no such serializer can be created. Params is the set of parameters applied to the
+ // media type that may modify the resulting output. ok will be false if no serializer matched
+ // the media type.
+ StreamingSerializerForMediaType(mediaType string, params map[string]string) (s StreamSerializerInfo, ok bool)
+
+ // EncoderForVersion returns an encoder that ensures objects being written to the provided
+ // serializer are in the provided group version.
+ // TODO: take multiple group versions
+ EncoderForVersion(serializer Encoder, gv unversioned.GroupVersion) Encoder
+ // DecoderForVersion returns a decoder that ensures objects being read by the provided
+ // serializer are in the provided group version by default.
+ // TODO: take multiple group versions
+ DecoderToVersion(serializer Decoder, gv unversioned.GroupVersion) 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 {
+ // SerializerForMediaType returns a serializer for the provided media type. Options is a set of
+ // parameters applied to the media type that may modify the resulting output.
+ SerializerForMediaType(mediaType string, options map[string]string) (SerializerInfo, bool)
+
+ // 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.
+ // TODO: take multiple group versions
+ EncoderForVersion(serializer Encoder, gv unversioned.GroupVersion) Encoder
+ // DecoderForVersion returns a decoder that ensures objects being read by the provided
+ // serializer are in the provided group version by default.
+ // TODO: take multiple group versions
+ DecoderToVersion(serializer Decoder, gv unversioned.GroupVersion) Decoder
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Non-codec interfaces
+
+type ObjectVersioner interface {
+ ConvertToVersion(in Object, outVersion unversioned.GroupVersion) (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.
+ Convert(in, out 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.
+ ConvertToVersion(in Object, outVersion unversioned.GroupVersion) (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) ([]unversioned.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 unversioned.GroupVersionKind) bool
+}
+
+// ObjectCreater contains methods for instantiating an object by kind and version.
+type ObjectCreater interface {
+ New(kind unversioned.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() unversioned.ObjectKind
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/register.go
new file mode 100644
index 0000000..39a1eb1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/register.go
@@ -0,0 +1,66 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+)
+
+// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) SetGroupVersionKind(gvk unversioned.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) GroupVersionKind() unversioned.GroupVersionKind {
+ return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *Unknown) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
+
+func (obj *Unstructured) GetObjectKind() unversioned.ObjectKind { return obj }
+func (obj *UnstructuredList) GetObjectKind() unversioned.ObjectKind { return obj }
+
+// 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() unversioned.ObjectKind {
+ last := obj.Last()
+ if last == nil {
+ return unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go
new file mode 100644
index 0000000..f98ec54
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go
@@ -0,0 +1,623 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+)
+
+// 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[unversioned.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][]unversioned.GroupVersionKind
+
+ // unversionedTypes are transformed without conversion in ConvertToVersion.
+ unversionedTypes map[reflect.Type]unversioned.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
+
+ // 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[unversioned.GroupVersionKind]reflect.Type{},
+ typeToGVK: map[reflect.Type][]unversioned.GroupVersionKind{},
+ unversionedTypes: map[reflect.Type]unversioned.GroupVersionKind{},
+ unversionedKinds: map[string]reflect.Type{},
+ cloner: conversion.NewCloner(),
+ fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{},
+ }
+ 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 unversioned.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 _, ok := s.unversionedKinds[gvk.Kind]; ok {
+ panic(fmt.Sprintf("%v has already been registered as unversioned kind %q - kind name must be unique", reflect.TypeOf(t), gvk.Kind))
+ }
+ 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 unversioned.GroupVersion, types ...Object) {
+ if len(gv.Version) == 0 {
+ panic(fmt.Sprintf("version is required on all types: %s %v", gv, types[0]))
+ }
+ for _, obj := range types {
+ t := reflect.TypeOf(obj)
+ 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.")
+ }
+
+ gvk := gv.WithKind(t.Name())
+ s.gvkToType[gvk] = t
+ s.typeToGVK[t] = append(s.typeToGVK[t], gvk)
+ }
+}
+
+// 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 unversioned.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.")
+ }
+
+ s.gvkToType[gvk] = t
+ s.typeToGVK[t] = append(s.typeToGVK[t], gvk)
+}
+
+// KnownTypes returns the types known for the given version.
+func (s *Scheme) KnownTypes(gv unversioned.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
+}
+
+// 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) (unversioned.GroupVersionKind, bool, error) {
+ gvks, unversionedType, err := s.ObjectKinds(obj)
+ if err != nil {
+ return unversioned.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) ([]unversioned.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, &notRegisteredErr{t: 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 unversioned.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 unversioned.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, &notRegisteredErr{gvk: 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 ...interface{}) error {
+ for _, f := range deepCopyFuncs {
+ if err := s.cloner.RegisterGeneratedDeepCopyFunc(f); 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)
+}
+
+// AddDefaultingFuncs adds functions to the list of default-value functions.
+// Each of the given functions is responsible for applying default values
+// when converting an instance of a versioned API object into an internal
+// API object. These functions do not need to handle sub-objects. We deduce
+// how to call these functions from the types of their two parameters.
+//
+// s.AddDefaultingFuncs(
+// func(obj *v1.Pod) {
+// if obj.OptionalField == "" {
+// obj.OptionalField = "DefaultValue"
+// }
+// },
+// )
+func (s *Scheme) AddDefaultingFuncs(defaultingFuncs ...interface{}) error {
+ for _, f := range defaultingFuncs {
+ err := s.converter.RegisterDefaultingFunc(f)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// 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), but in
+// that case, the conversion.Scope object passed to your conversion functions won't
+// have SrcVersion or DestVersion fields set correctly in Meta().
+func (s *Scheme) Convert(in, out interface{}) error {
+ inVersion := unversioned.GroupVersion{Group: "unknown", Version: "unknown"}
+ outVersion := unversioned.GroupVersion{Group: "unknown", Version: "unknown"}
+ if inObj, ok := in.(Object); ok {
+ if gvks, _, err := s.ObjectKinds(inObj); err == nil {
+ inVersion = gvks[0].GroupVersion()
+ }
+ }
+ if outObj, ok := out.(Object); ok {
+ if gvks, _, err := s.ObjectKinds(outObj); err == nil {
+ outVersion = gvks[0].GroupVersion()
+ }
+ }
+ flags, meta := s.generateConvertMeta(inVersion, outVersion, in)
+ 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. The serializer handles loading/serializing nested objects.
+func (s *Scheme) ConvertToVersion(in Object, outVersion unversioned.GroupVersion) (Object, error) {
+ switch in.(type) {
+ case *Unknown, *Unstructured, *UnstructuredList:
+ old := in.GetObjectKind().GroupVersionKind()
+ defer in.GetObjectKind().SetGroupVersionKind(old)
+ setTargetVersion(in, s, outVersion)
+ return in, nil
+ }
+ 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)
+ }
+
+ var kind unversioned.GroupVersionKind
+ if unversionedKind, ok := s.unversionedTypes[t]; ok {
+ kind = unversionedKind
+ } else {
+ kinds, ok := s.typeToGVK[t]
+ if !ok || len(kinds) == 0 {
+ return nil, fmt.Errorf("%v is not a registered type and cannot be converted into version %q", t, outVersion)
+ }
+ kind = kinds[0]
+ }
+
+ outKind := outVersion.WithKind(kind.Kind)
+
+ inKinds, _, err := s.ObjectKinds(in)
+ if err != nil {
+ return nil, err
+ }
+
+ out, err := s.New(outKind)
+ if err != nil {
+ return nil, err
+ }
+
+ flags, meta := s.generateConvertMeta(inKinds[0].GroupVersion(), outVersion, in)
+ if err := s.converter.Convert(in, out, flags, meta); err != nil {
+ return nil, err
+ }
+
+ setTargetVersion(out, s, outVersion)
+ return out, nil
+}
+
+// UnsafeConvertToVersion will convert in to the provided outVersion 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, outVersion unversioned.GroupVersion) (Object, error) {
+ switch t := in.(type) {
+ case *Unknown:
+ t.APIVersion = outVersion.String()
+ return t, nil
+ case *Unstructured:
+ t.SetAPIVersion(outVersion.String())
+ return t, nil
+ case *UnstructuredList:
+ t.SetAPIVersion(outVersion.String())
+ return t, nil
+ }
+
+ // 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, fmt.Errorf("%v is not a registered type and cannot be converted into version %q", t, outVersion)
+ }
+
+ // if the Go type is also registered to the destination kind, no conversion is necessary
+ for i := range kinds {
+ if kinds[i].Version == outVersion.Version && kinds[i].Group == outVersion.Group {
+ setTargetKind(in, kinds[i])
+ return in, nil
+ }
+ }
+
+ // type is unversioned, no conversion necessary
+ // it should be possible to avoid this allocation
+ if unversionedKind, ok := s.unversionedTypes[t]; ok {
+ kind := unversionedKind
+ outKind := outVersion.WithKind(kind.Kind)
+ setTargetKind(in, outKind)
+ return in, nil
+ }
+
+ // allocate a new object as the target using the target kind
+ // TODO: this should look in the target group version and find the first kind that matches, rather than the
+ // first kind registered in typeToGVK
+ kind := kinds[0]
+ kind.Version = outVersion.Version
+ kind.Group = outVersion.Group
+ out, err := s.New(kind)
+ if err != nil {
+ return nil, err
+ }
+
+ // TODO: try to avoid the allocations here - in fast paths we are not likely to need these flags or meta
+ flags, meta := s.converter.DefaultMeta(t)
+ if err := s.converter.Convert(in, out, flags, meta); err != nil {
+ return nil, err
+ }
+
+ setTargetKind(out, kind)
+ return out, nil
+}
+
+// generateConvertMeta constructs the meta value we pass to Convert.
+func (s *Scheme) generateConvertMeta(srcGroupVersion, destGroupVersion unversioned.GroupVersion, in interface{}) (conversion.FieldMatchingFlags, *conversion.Meta) {
+ return s.converter.DefaultMeta(reflect.TypeOf(in))
+}
+
+// setTargetVersion is deprecated and should be replaced by use of setTargetKind
+func setTargetVersion(obj Object, raw *Scheme, gv unversioned.GroupVersion) {
+ if gv.Version == APIVersionInternal {
+ // internal is a special case
+ obj.GetObjectKind().SetGroupVersionKind(unversioned.GroupVersionKind{})
+ return
+ }
+ if gvks, _, _ := raw.ObjectKinds(obj); len(gvks) > 0 {
+ obj.GetObjectKind().SetGroupVersionKind(unversioned.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: gvks[0].Kind})
+ } else {
+ obj.GetObjectKind().SetGroupVersionKind(unversioned.GroupVersionKind{Group: gv.Group, Version: gv.Version})
+ }
+}
+
+// setTargetKind sets the kind on an object, taking into account whether the target kind is the internal version.
+func setTargetKind(obj Object, kind unversioned.GroupVersionKind) {
+ if kind.Version == APIVersionInternal {
+ // internal is a special case
+ // TODO: look at removing the need to special case this
+ obj.GetObjectKind().SetGroupVersionKind(unversioned.GroupVersionKind{})
+ return
+ }
+ obj.GetObjectKind().SetGroupVersionKind(kind)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go
new file mode 100644
index 0000000..758aa6b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go
@@ -0,0 +1,364 @@
+/*
+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 (
+ "io"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer/json"
+ "k8s.io/kubernetes/pkg/runtime/serializer/recognizer"
+ "k8s.io/kubernetes/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
+ // RawSerializer serializes an object without adding a type wrapper. Some serializers, like JSON
+ // automatically include identifying type information with the JSON. Others, like Protobuf, need
+ // a wrapper object that includes type information. This serializer should be set if the serializer
+ // can serialize / deserialize objects without type info. Note that this serializer will always
+ // be expected to pass into or a gvk to Decode, since no type information will be available on
+ // the object itself.
+ RawSerializer runtime.Serializer
+ // Specialize gives the type the opportunity to return a different serializer implementation if
+ // the content type contains alternate operations. Here it is used to implement "pretty" as an
+ // option to application/json, but could also be used to allow serializers to perform type
+ // defaulting or alter output.
+ Specialize func(map[string]string) (runtime.Serializer, bool)
+
+ AcceptStreamContentTypes []string
+ StreamContentType string
+
+ Framer runtime.Framer
+ StreamSerializer runtime.Serializer
+ StreamSpecialize func(map[string]string) (runtime.Serializer, bool)
+}
+
+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,
+
+ AcceptStreamContentTypes: []string{"application/json", "application/json;stream=watch"},
+ StreamContentType: "application/json",
+ Framer: json.Framer,
+ StreamSerializer: jsonSerializer,
+ },
+ {
+ AcceptContentTypes: []string{"application/yaml"},
+ ContentType: "application/yaml",
+ FileExtensions: []string{"yaml"},
+ EncodesAsText: true,
+ Serializer: yamlSerializer,
+
+ // TODO: requires runtime.RawExtension to properly distinguish when the nested content is
+ // yaml, because the yaml encoder invokes MarshalJSON first
+ //AcceptStreamContentTypes: []string{"application/yaml", "application/yaml;stream=watch"},
+ //StreamContentType: "application/yaml;stream=watch",
+ //Framer: json.YAMLFramer,
+ //StreamSerializer: 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 []string
+ streamingAccepts []string
+
+ 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))
+ accepts := []string{}
+ 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{}{}
+ accepts = append(accepts, mediaType)
+ if mediaType == "application/json" {
+ legacySerializer = d.Serializer
+ }
+ }
+ }
+ if legacySerializer == nil {
+ legacySerializer = serializers[0].Serializer
+ }
+
+ streamAccepts := []string{}
+ alreadyAccepted = make(map[string]struct{})
+ for _, d := range serializers {
+ if len(d.StreamContentType) == 0 {
+ continue
+ }
+ for _, mediaType := range d.AcceptStreamContentTypes {
+ if _, ok := alreadyAccepted[mediaType]; ok {
+ continue
+ }
+ alreadyAccepted[mediaType] = struct{}{}
+ streamAccepts = append(streamAccepts, mediaType)
+ }
+ }
+
+ return CodecFactory{
+ scheme: scheme,
+ serializers: serializers,
+ universal: recognizer.NewDecoder(decoders...),
+
+ accepts: accepts,
+ streamingAccepts: streamAccepts,
+
+ legacySerializer: legacySerializer,
+ }
+}
+
+var _ runtime.NegotiatedSerializer = &CodecFactory{}
+
+// SupportedMediaTypes returns the RFC2046 media types that this factory has serializers for.
+func (f CodecFactory) SupportedMediaTypes() []string {
+ return f.accepts
+}
+
+// SupportedStreamingMediaTypes returns the RFC2046 media types that this factory has stream serializers for.
+func (f CodecFactory) SupportedStreamingMediaTypes() []string {
+ return f.streamingAccepts
+}
+
+// LegacyCodec encodes output to a given API version, and decodes output into the internal form from
+// any recognized source. The returned codec will always encode output to JSON.
+//
+// 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().
+func (f CodecFactory) LegacyCodec(version ...unversioned.GroupVersion) runtime.Codec {
+ return versioning.NewCodecForScheme(f.scheme, f.legacySerializer, f.universal, version, nil)
+}
+
+// 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
+func (f CodecFactory) UniversalDecoder(versions ...unversioned.GroupVersion) runtime.Decoder {
+ return f.CodecForVersions(nil, f.universal, nil, versions)
+}
+
+// CodecFor 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 []unversioned.GroupVersion, decode []unversioned.GroupVersion) runtime.Codec {
+ return versioning.NewCodecForScheme(f.scheme, encoder, decoder, encode, decode)
+}
+
+// DecoderToVersion returns a decoder that targets the provided group version.
+func (f CodecFactory) DecoderToVersion(decoder runtime.Decoder, gv unversioned.GroupVersion) runtime.Decoder {
+ return f.CodecForVersions(nil, decoder, nil, []unversioned.GroupVersion{gv})
+}
+
+// EncoderForVersion returns an encoder that targets the provided group version.
+func (f CodecFactory) EncoderForVersion(encoder runtime.Encoder, gv unversioned.GroupVersion) runtime.Encoder {
+ return f.CodecForVersions(encoder, nil, []unversioned.GroupVersion{gv}, nil)
+}
+
+// SerializerForMediaType returns a serializer that matches the provided RFC2046 mediaType, or false if no such
+// serializer exists
+func (f CodecFactory) SerializerForMediaType(mediaType string, params map[string]string) (runtime.SerializerInfo, bool) {
+ for _, s := range f.serializers {
+ for _, accepted := range s.AcceptContentTypes {
+ if accepted == mediaType {
+ // specialization abstracts variants to the content type
+ if s.Specialize != nil && len(params) > 0 {
+ serializer, ok := s.Specialize(params)
+ // TODO: return formatted mediaType+params
+ return runtime.SerializerInfo{Serializer: serializer, MediaType: s.ContentType, EncodesAsText: s.EncodesAsText}, ok
+ }
+
+ // legacy support for ?pretty=1 continues, but this is more formally defined
+ if v, ok := params["pretty"]; ok && v == "1" && s.PrettySerializer != nil {
+ return runtime.SerializerInfo{Serializer: s.PrettySerializer, MediaType: s.ContentType, EncodesAsText: s.EncodesAsText}, true
+ }
+
+ // return the base variant
+ return runtime.SerializerInfo{Serializer: s.Serializer, MediaType: s.ContentType, EncodesAsText: s.EncodesAsText}, true
+ }
+ }
+ }
+ return runtime.SerializerInfo{}, false
+}
+
+// StreamingSerializerForMediaType returns a serializer that matches the provided RFC2046 mediaType, or false if no such
+// serializer exists
+func (f CodecFactory) StreamingSerializerForMediaType(mediaType string, params map[string]string) (runtime.StreamSerializerInfo, bool) {
+ for _, s := range f.serializers {
+ for _, accepted := range s.AcceptStreamContentTypes {
+ if accepted == mediaType {
+ // TODO: accept params
+ nested, ok := f.SerializerForMediaType(s.ContentType, nil)
+ if !ok {
+ panic("no serializer defined for internal content type")
+ }
+
+ if s.StreamSpecialize != nil && len(params) > 0 {
+ serializer, ok := s.StreamSpecialize(params)
+ // TODO: return formatted mediaType+params
+ return runtime.StreamSerializerInfo{
+ SerializerInfo: runtime.SerializerInfo{
+ Serializer: serializer,
+ MediaType: s.StreamContentType,
+ EncodesAsText: s.EncodesAsText,
+ },
+ Framer: s.Framer,
+ Embedded: nested,
+ }, ok
+ }
+
+ return runtime.StreamSerializerInfo{
+ SerializerInfo: runtime.SerializerInfo{
+ Serializer: s.StreamSerializer,
+ MediaType: s.StreamContentType,
+ EncodesAsText: s.EncodesAsText,
+ },
+ Framer: s.Framer,
+ Embedded: nested,
+ }, true
+ }
+ }
+ }
+ return runtime.StreamSerializerInfo{}, false
+}
+
+// SerializerForFileExtension returns a serializer for the provided extension, or false if no serializer matches.
+func (f CodecFactory) SerializerForFileExtension(extension string) (runtime.Serializer, bool) {
+ for _, s := range f.serializers {
+ for _, ext := range s.FileExtensions {
+ if extension == ext {
+ return s.Serializer, true
+ }
+ }
+ }
+ return nil, false
+}
+
+// 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. gv is ignored.
+func (f DirectCodecFactory) EncoderForVersion(serializer runtime.Encoder, gv unversioned.GroupVersion) runtime.Encoder {
+ return DirectCodec{
+ runtime.NewCodec(serializer, nil),
+ f.CodecFactory.scheme,
+ }
+}
+
+// DecoderToVersion returns an decoder that does not do conversion. gv is ignored.
+func (f DirectCodecFactory) DecoderToVersion(serializer runtime.Decoder, gv unversioned.GroupVersion) runtime.Decoder {
+ return DirectCodec{
+ runtime.NewCodec(nil, serializer),
+ nil,
+ }
+}
+
+// DirectCodec is a codec that does not do conversion. It sets the gvk during serialization, and removes the gvk during deserialization.
+type DirectCodec struct {
+ runtime.Serializer
+ runtime.ObjectTyper
+}
+
+// EncodeToStream does not do conversion. It sets the gvk during serialization. overrides are ignored.
+func (c DirectCodec) Encode(obj runtime.Object, stream io.Writer) error {
+ gvks, _, err := c.ObjectTyper.ObjectKinds(obj)
+ if err != nil {
+ return err
+ }
+ kind := obj.GetObjectKind()
+ oldGVK := kind.GroupVersionKind()
+ kind.SetGroupVersionKind(gvks[0])
+ err = c.Serializer.Encode(obj, stream)
+ kind.SetGroupVersionKind(oldGVK)
+ return err
+}
+
+// Decode does not do conversion. It removes the gvk during deserialization.
+func (c DirectCodec) Decode(data []byte, defaults *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) {
+ obj, gvk, err := c.Serializer.Decode(data, defaults, into)
+ if obj != nil {
+ kind := obj.GetObjectKind()
+ // clearing the gvk is just a convention of a codec
+ kind.SetGroupVersionKind(unversioned.GroupVersionKind{})
+ }
+ return obj, gvk, err
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go
new file mode 100644
index 0000000..c26fa50
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go
@@ -0,0 +1,243 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/framer"
+ utilyaml "k8s.io/kubernetes/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{}
+
+// 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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go
new file mode 100644
index 0000000..b9bea21
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go
@@ -0,0 +1,61 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+)
+
+// 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) (*unversioned.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) (*unversioned.GroupVersionKind, error) {
+ findKind := struct {
+ APIVersion string `json:"apiVersion,omitempty"`
+ 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 := unversioned.ParseGroupVersion(findKind.APIVersion)
+ if err != nil {
+ return nil, err
+ }
+ return &unversioned.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.Kind}, nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.go
new file mode 100644
index 0000000..59b078c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.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 serializer
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// TODO: We should figure out what happens when someone asks
+// encoder for version and it conflicts with the raw serializer.
+type negotiatedSerializerWrapper struct {
+ info runtime.SerializerInfo
+ streamInfo runtime.StreamSerializerInfo
+}
+
+func NegotiatedSerializerWrapper(info runtime.SerializerInfo, streamInfo runtime.StreamSerializerInfo) runtime.NegotiatedSerializer {
+ return &negotiatedSerializerWrapper{info, streamInfo}
+}
+
+func (n *negotiatedSerializerWrapper) SupportedMediaTypes() []string {
+ return []string{}
+}
+
+func (n *negotiatedSerializerWrapper) SerializerForMediaType(mediaType string, options map[string]string) (runtime.SerializerInfo, bool) {
+ return n.info, true
+}
+
+func (n *negotiatedSerializerWrapper) SupportedStreamingMediaTypes() []string {
+ return []string{}
+}
+
+func (n *negotiatedSerializerWrapper) StreamingSerializerForMediaType(mediaType string, options map[string]string) (runtime.StreamSerializerInfo, bool) {
+ return n.streamInfo, true
+}
+
+func (n *negotiatedSerializerWrapper) EncoderForVersion(e runtime.Encoder, _ unversioned.GroupVersion) runtime.Encoder {
+ return e
+}
+
+func (n *negotiatedSerializerWrapper) DecoderToVersion(d runtime.Decoder, _gv unversioned.GroupVersion) runtime.Decoder {
+ return d
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go
new file mode 100644
index 0000000..381748d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go
new file mode 100644
index 0000000..b9eb9e5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go
@@ -0,0 +1,433 @@
+/*
+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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/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/kubernetes/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{}
+
+// 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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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 len(intoUnknown.ContentType) == 0 {
+ 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 {
+ var unk runtime.Unknown
+ kind := obj.GetObjectKind().GroupVersionKind()
+ unk = runtime.Unknown{
+ TypeMeta: runtime.TypeMeta{
+ Kind: kind.Kind,
+ APIVersion: kind.GroupVersion().String(),
+ },
+ }
+
+ prefixSize := uint64(len(s.prefix))
+
+ 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, error) {
+ prefix := make([]byte, 4)
+ n, err := peek.Read(prefix)
+ if err != nil {
+ if err == io.EOF {
+ return false, nil
+ }
+ return false, err
+ }
+ if n != 4 {
+ return false, nil
+ }
+ return bytes.Equal(s.prefix, prefix), nil
+}
+
+// copyKindDefaults defaults dst to the value in src if dst does not have a value set.
+func copyKindDefaults(dst, src *unversioned.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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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 := &unversioned.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 *unversioned.GroupVersionKind, into runtime.Object, data []byte) (runtime.Object, *unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.go
new file mode 100644
index 0000000..5846d94
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.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 serializer
+
+import (
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/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"
+ contentTypeProtobufWatch = contentTypeProtobuf + ";stream=watch"
+)
+
+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,
+ RawSerializer: raw,
+
+ AcceptStreamContentTypes: []string{contentTypeProtobuf, contentTypeProtobufWatch},
+ StreamContentType: contentTypeProtobufWatch,
+ Framer: protobuf.LengthDelimitedFramer,
+ StreamSerializer: raw,
+ }, true
+}
+
+func init() {
+ serializerExtensions = append(serializerExtensions, protobufSerializer)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/recognizer.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/recognizer.go
new file mode 100644
index 0000000..310002a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming.go
new file mode 100644
index 0000000..ac17138
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go
new file mode 100644
index 0000000..6e67964
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go
@@ -0,0 +1,275 @@
+/*
+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 (
+ "fmt"
+ "io"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// EnableCrossGroupDecoding modifies the given decoder in place, if it is a codec
+// from this package. It allows objects from one group to be auto-decoded into
+// another group. 'destGroup' must already exist in the codec.
+// TODO: this is an encapsulation violation and should be refactored
+func EnableCrossGroupDecoding(d runtime.Decoder, sourceGroup, destGroup string) error {
+ internal, ok := d.(*codec)
+ if !ok {
+ return fmt.Errorf("unsupported decoder type")
+ }
+
+ dest, ok := internal.decodeVersion[destGroup]
+ if !ok {
+ return fmt.Errorf("group %q is not a possible destination group in the given codec", destGroup)
+ }
+ internal.decodeVersion[sourceGroup] = dest
+
+ return nil
+}
+
+// EnableCrossGroupEncoding modifies the given encoder in place, if it is a codec
+// from this package. It allows objects from one group to be auto-decoded into
+// another group. 'destGroup' must already exist in the codec.
+// TODO: this is an encapsulation violation and should be refactored
+func EnableCrossGroupEncoding(e runtime.Encoder, sourceGroup, destGroup string) error {
+ internal, ok := e.(*codec)
+ if !ok {
+ return fmt.Errorf("unsupported encoder type")
+ }
+
+ dest, ok := internal.encodeVersion[destGroup]
+ if !ok {
+ return fmt.Errorf("group %q is not a possible destination group in the given codec", destGroup)
+ }
+ internal.encodeVersion[sourceGroup] = dest
+
+ return nil
+}
+
+// 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 []unversioned.GroupVersion,
+ decodeVersion []unversioned.GroupVersion,
+) runtime.Codec {
+ return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(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,
+ encodeVersion []unversioned.GroupVersion,
+ decodeVersion []unversioned.GroupVersion,
+) runtime.Codec {
+ internal := &codec{
+ encoder: encoder,
+ decoder: decoder,
+ convertor: convertor,
+ creater: creater,
+ copier: copier,
+ typer: typer,
+ }
+ if encodeVersion != nil {
+ internal.encodeVersion = make(map[string]unversioned.GroupVersion)
+ for _, v := range encodeVersion {
+ // first one for a group wins. This is consistent with best to worst order throughout the codebase
+ if _, ok := internal.encodeVersion[v.Group]; ok {
+ continue
+ }
+ internal.encodeVersion[v.Group] = v
+ }
+ if len(internal.encodeVersion) == 1 {
+ for _, v := range internal.encodeVersion {
+ internal.preferredEncodeVersion = []unversioned.GroupVersion{v}
+ }
+ }
+ }
+ if decodeVersion != nil {
+ internal.decodeVersion = make(map[string]unversioned.GroupVersion)
+ for _, v := range decodeVersion {
+ // first one for a group wins. This is consistent with best to worst order throughout the codebase
+ if _, ok := internal.decodeVersion[v.Group]; ok {
+ continue
+ }
+ internal.decodeVersion[v.Group] = v
+ }
+ }
+
+ return internal
+}
+
+type codec struct {
+ encoder runtime.Encoder
+ decoder runtime.Decoder
+ convertor runtime.ObjectConvertor
+ creater runtime.ObjectCreater
+ copier runtime.ObjectCopier
+ typer runtime.ObjectTyper
+
+ encodeVersion map[string]unversioned.GroupVersion
+ decodeVersion map[string]unversioned.GroupVersion
+
+ preferredEncodeVersion []unversioned.GroupVersion
+}
+
+// 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 *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.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 we specify a target, use generic conversion.
+ if into != nil {
+ if into == obj {
+ if isVersioned {
+ return versioned, gvk, nil
+ }
+ return into, gvk, nil
+ }
+ if err := c.convertor.Convert(obj, into); err != nil {
+ return nil, gvk, err
+ }
+ if isVersioned {
+ versioned.Objects = []runtime.Object{obj, into}
+ return versioned, gvk, nil
+ }
+ return into, gvk, nil
+ }
+
+ // invoke a version conversion
+ group := gvk.Group
+ if defaultGVK != nil {
+ group = defaultGVK.Group
+ }
+ var targetGV unversioned.GroupVersion
+ if c.decodeVersion == nil {
+ // convert to internal by default
+ targetGV.Group = group
+ targetGV.Version = runtime.APIVersionInternal
+ } else {
+ gv, ok := c.decodeVersion[group]
+ if !ok {
+ // unknown objects are left in their original version
+ if isVersioned {
+ versioned.Objects = []runtime.Object{obj}
+ return versioned, gvk, nil
+ }
+ return obj, gvk, nil
+ }
+ targetGV = gv
+ }
+
+ if gvk.GroupVersion() == targetGV {
+ if isVersioned {
+ versioned.Objects = []runtime.Object{obj}
+ return versioned, gvk, nil
+ }
+ return obj, gvk, nil
+ }
+
+ if isVersioned {
+ // create a copy, because ConvertToVersion does not guarantee non-mutation of objects
+ copied, err := c.copier.Copy(obj)
+ if err != nil {
+ copied = obj
+ }
+ versioned.Objects = []runtime.Object{copied}
+ }
+
+ // Convert if needed.
+ out, err := c.convertor.ConvertToVersion(obj, targetGV)
+ if err != nil {
+ return nil, gvk, err
+ }
+ if isVersioned {
+ 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 {
+ if _, ok := obj.(*runtime.Unknown); ok {
+ return c.encoder.Encode(obj, w)
+ }
+ gvks, isUnversioned, err := c.typer.ObjectKinds(obj)
+ if err != nil {
+ return err
+ }
+ gvk := gvks[0]
+
+ if c.encodeVersion == nil || isUnversioned {
+ objectKind := obj.GetObjectKind()
+ old := objectKind.GroupVersionKind()
+ objectKind.SetGroupVersionKind(gvk)
+ err = c.encoder.Encode(obj, w)
+ objectKind.SetGroupVersionKind(old)
+ return err
+ }
+
+ targetGV, ok := c.encodeVersion[gvk.Group]
+
+ // attempt a conversion to the sole encode version
+ if !ok && c.preferredEncodeVersion != nil {
+ ok = true
+ targetGV = c.preferredEncodeVersion[0]
+ }
+
+ // if no fallback is available, error
+ if !ok {
+ return fmt.Errorf("the codec does not recognize group %q for kind %q and cannot encode it", gvk.Group, gvk.Kind)
+ }
+
+ // Perform a conversion if necessary
+ objectKind := obj.GetObjectKind()
+ old := objectKind.GroupVersionKind()
+ out, err := c.convertor.ConvertToVersion(obj, targetGV)
+ if err != nil {
+ if ok {
+ return err
+ }
+ } else {
+ obj = out
+ }
+ // Conversion is responsible for setting the proper group, version, and kind onto the outgoing object
+ err = c.encoder.Encode(obj, w)
+ // restore the old GVK, in case conversion returned the same object
+ objectKind.SetGroupVersionKind(old)
+ return err
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator.go
new file mode 100644
index 0000000..29722d5
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types.go
new file mode 100644
index 0000000..5033c0d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types.go
@@ -0,0 +1,514 @@
+/*
+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"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api/meta/metatypes"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/types"
+)
+
+// 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 *unversioned.GroupVersionKind) { unversioned.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
+type TypeMeta struct {
+ APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
+ 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
+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
+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"`
+}
+
+// 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.
+// TODO: Make this object have easy access to field based accessors and settors for
+// metadata and field mutatation.
+type Unstructured struct {
+ // Object is a JSON compatible map with string, float, int, []interface{}, or map[string]interface{}
+ // children.
+ Object map[string]interface{}
+}
+
+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 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{}) metatypes.OwnerReference {
+ v := src.(map[string]interface{})
+ controllerPtr, ok := (getNestedField(v, "controller")).(*bool)
+ if !ok {
+ controllerPtr = nil
+ } else {
+ if controllerPtr != nil {
+ controller := *controllerPtr
+ controllerPtr = &controller
+ }
+ }
+ return metatypes.OwnerReference{
+ Kind: getNestedString(v, "kind"),
+ Name: getNestedString(v, "name"),
+ APIVersion: getNestedString(v, "apiVersion"),
+ UID: (types.UID)(getNestedString(v, "uid")),
+ Controller: controllerPtr,
+ }
+}
+
+func setOwnerReference(src metatypes.OwnerReference) map[string]interface{} {
+ ret := make(map[string]interface{})
+ controllerPtr := src.Controller
+ if controllerPtr != nil {
+ controller := *controllerPtr
+ controllerPtr = &controller
+ }
+ setNestedField(ret, src.Kind, "kind")
+ setNestedField(ret, src.Name, "name")
+ setNestedField(ret, src.APIVersion, "apiVersion")
+ setNestedField(ret, string(src.UID), "uid")
+ setNestedField(ret, controllerPtr, "controller")
+ 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() []metatypes.OwnerReference {
+ original, err := getOwnerReferences(u.Object)
+ if err != nil {
+ glog.V(6).Info(err)
+ return nil
+ }
+ ret := make([]metatypes.OwnerReference, 0, len(original))
+ for i := 0; i < len(original); i++ {
+ ret = append(ret, extractOwnerReference(original[i]))
+ }
+ return ret
+}
+
+func (u *Unstructured) SetOwnerReferences(references []metatypes.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) GetSelfLink() string {
+ return getNestedString(u.Object, "metadata", "selfLink")
+}
+
+func (u *Unstructured) SetSelfLink(selfLink string) {
+ u.setNestedField(selfLink, "metadata", "selfLink")
+}
+
+func (u *Unstructured) GetCreationTimestamp() unversioned.Time {
+ var timestamp unversioned.Time
+ timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "creationTimestamp"))
+ return timestamp
+}
+
+func (u *Unstructured) SetCreationTimestamp(timestamp unversioned.Time) {
+ ts, _ := timestamp.MarshalQueryParameter()
+ u.setNestedField(ts, "metadata", "creationTimestamp")
+}
+
+func (u *Unstructured) GetDeletionTimestamp() *unversioned.Time {
+ var timestamp unversioned.Time
+ timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "deletionTimestamp"))
+ if timestamp.IsZero() {
+ return nil
+ }
+ return &timestamp
+}
+
+func (u *Unstructured) SetDeletionTimestamp(timestamp *unversioned.Time) {
+ ts, _ := timestamp.MarshalQueryParameter()
+ u.setNestedField(ts, "metadata", "deletionTimestamp")
+}
+
+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 unversioned.GroupVersionKind) {
+ u.SetAPIVersion(gvk.GroupVersion().String())
+ u.SetKind(gvk.Kind)
+}
+
+func (u *Unstructured) GroupVersionKind() unversioned.GroupVersionKind {
+ gv, err := unversioned.ParseGroupVersion(u.GetAPIVersion())
+ if err != nil {
+ return unversioned.GroupVersionKind{}
+ }
+ gvk := gv.WithKind(u.GetKind())
+ return gvk
+}
+
+func (u *Unstructured) GetFinalizers() []string {
+ return getNestedSlice(u.Object, "metadata", "finalizers")
+}
+
+func (u *Unstructured) SetFinalizers(finalizers []string) {
+ u.setNestedSlice(finalizers, "metadata", "finalizers")
+}
+
+// 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"`
+}
+
+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 unversioned.GroupVersionKind) {
+ u.SetAPIVersion(gvk.GroupVersion().String())
+ u.SetKind(gvk.Kind)
+}
+
+func (u *UnstructuredList) GroupVersionKind() unversioned.GroupVersionKind {
+ gv, err := unversioned.ParseGroupVersion(u.GetAPIVersion())
+ if err != nil {
+ return unversioned.GroupVersionKind{}
+ }
+ gvk := gv.WithKind(u.GetKind())
+ return gvk
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types_proto.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/types_proto.go
new file mode 100644
index 0000000..ead96ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/unstructured.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/unstructured.go
new file mode 100644
index 0000000..048e6dc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/runtime/unstructured.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 runtime
+
+import (
+ gojson "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/util/json"
+)
+
+// 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 Codec = unstructuredJSONScheme{}
+
+type unstructuredJSONScheme struct{}
+
+func (s unstructuredJSONScheme) Decode(data []byte, _ *unversioned.GroupVersionKind, obj Object) (Object, *unversioned.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, NewMissingKindErr(string(data))
+ }
+
+ return obj, &gvk, nil
+}
+
+func (unstructuredJSONScheme) Encode(obj 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 *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) (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 Object) error {
+ switch x := obj.(type) {
+ case *Unstructured:
+ return s.decodeToUnstructured(data, x)
+ case *UnstructuredList:
+ return s.decodeToList(data, x)
+ case *VersionedObjects:
+ u := new(Unstructured)
+ err := s.decodeToUnstructured(data, u)
+ if err == nil {
+ x.Objects = []Object{u}
+ }
+ 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 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 Object, outVersion unversioned.GroupVersion) (Object, error) {
+ if gvk := in.GetObjectKind().GroupVersionKind(); gvk.GroupVersion() != outVersion {
+ return nil, errors.New("unstructured converter cannot convert versions")
+ }
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/doc.go
new file mode 100644
index 0000000..783cbcd
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go
new file mode 100644
index 0000000..70a9ac3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go
@@ -0,0 +1,35 @@
+/*
+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
+
+// 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
+}
+
+// String returns the general purpose string representation
+func (n NamespacedName) String() string {
+ return n.Namespace + "/" + n.Name
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/uid.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/uid.go
new file mode 100644
index 0000000..8693392
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/unix_user_id.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/unix_user_id.go
new file mode 100644
index 0000000..dc770c1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/types/unix_user_id.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.
+*/
+
+package types
+
+// int64 is used as a safe bet against wrap-around (uid's are general
+// int32) and to support uid_t -1, and -2.
+
+type UnixUserID int64
+type UnixGroupID int64
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/clock.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/clock.go
new file mode 100644
index 0000000..71aca9e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/clock.go
@@ -0,0 +1,218 @@
+/*
+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 (
+ "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
+ 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) 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
+}
+
+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
+}
+
+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 or Tick
+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:
+ default:
+ }
+ } else {
+ w.destChan <- t
+ }
+
+ 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) 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")
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/crypto/crypto.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/crypto/crypto.go
new file mode 100644
index 0000000..b573c8a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/crypto/crypto.go
@@ -0,0 +1,190 @@
+/*
+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 crypto
+
+import (
+ "bytes"
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "crypto/x509/pkix"
+ "encoding/pem"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "math/big"
+ "net"
+ "os"
+ "path/filepath"
+ "time"
+)
+
+// ShouldGenSelfSignedCerts returns false if the certificate or key files already exists,
+// otherwise returns true.
+func ShouldGenSelfSignedCerts(certPath, keyPath string) bool {
+ if canReadFile(certPath) || canReadFile(keyPath) {
+ return false
+ }
+
+ return true
+}
+
+// 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
+}
+
+// GenerateSelfSignedCert 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
+// The certificate will be created with file mode 0644. The key will be created with file mode 0600.
+// If the certificate or key files already exist, they will be overwritten.
+// Any parent directories of the certPath or keyPath will be created as needed with file mode 0755.
+func GenerateSelfSignedCert(host, certPath, keyPath string, alternateIPs []net.IP, alternateDNS []string) error {
+ priv, err := rsa.GenerateKey(rand.Reader, 2048)
+ if err != nil {
+ return 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(rand.Reader, &template, &template, &priv.PublicKey, priv)
+ if err != nil {
+ return err
+ }
+
+ // Generate cert
+ certBuffer := bytes.Buffer{}
+ if err := pem.Encode(&certBuffer, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil {
+ return err
+ }
+
+ // Generate key
+ keyBuffer := bytes.Buffer{}
+ if err := pem.Encode(&keyBuffer, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil {
+ return err
+ }
+
+ // Write cert
+ if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil {
+ return err
+ }
+ if err := ioutil.WriteFile(certPath, certBuffer.Bytes(), os.FileMode(0644)); err != nil {
+ return err
+ }
+
+ // Write key
+ if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil {
+ return err
+ }
+ if err := ioutil.WriteFile(keyPath, keyBuffer.Bytes(), os.FileMode(0600)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// CertPoolFromFile 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 CertPoolFromFile(filename string) (*x509.CertPool, error) {
+ certs, err := certificatesFromFile(filename)
+ if err != nil {
+ return nil, err
+ }
+ pool := x509.NewCertPool()
+ for _, cert := range certs {
+ pool.AddCert(cert)
+ }
+ return pool, nil
+}
+
+// certificatesFromFile 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 certificatesFromFile(file string) ([]*x509.Certificate, error) {
+ if len(file) == 0 {
+ return nil, errors.New("error reading certificates from an empty filename")
+ }
+ pemBlock, err := ioutil.ReadFile(file)
+ if err != nil {
+ return nil, err
+ }
+ certs, err := CertsFromPEM(pemBlock)
+ if err != nil {
+ return nil, fmt.Errorf("error reading %s: %s", file, err)
+ }
+ return certs, nil
+}
+
+// CertsFromPEM 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 CertsFromPEM(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 != "CERTIFICATE" || 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/doc.go
new file mode 100644
index 0000000..1747db5
--- /dev/null
+++ b/src/kube2msb/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go
new file mode 100644
index 0000000..b3b39bc
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go
new file mode 100644
index 0000000..0445c14
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go
@@ -0,0 +1,156 @@
+/*
+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"
+)
+
+// 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.
+func NewAggregate(errlist []error) Aggregate {
+ if len(errlist) == 0 {
+ return nil
+ }
+ return aggregate(errlist)
+}
+
+// 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)
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff.go
new file mode 100644
index 0000000..59b9976
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/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/kubernetes/pkg/util"
+ "k8s.io/kubernetes/pkg/util/integer"
+)
+
+type backoffEntry struct {
+ backoff time.Duration
+ lastUpdate time.Time
+}
+
+type Backoff struct {
+ sync.Mutex
+ Clock util.Clock
+ defaultDuration time.Duration
+ maxDuration time.Duration
+ perItemBackoff map[string]*backoffEntry
+}
+
+func NewFakeBackOff(initial, max time.Duration, tc *util.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: util.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle.go
new file mode 100644
index 0000000..482ba7d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle.go
@@ -0,0 +1,116 @@
+/*
+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
+}
+
+type tokenBucketRateLimiter struct {
+ limiter *ratelimit.Bucket
+}
+
+// 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 &tokenBucketRateLimiter{limiter}
+}
+
+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() {
+}
+
+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() {}
+
+type fakeNeverRateLimiter struct {
+ wg sync.WaitGroup
+}
+
+func NewFakeNeverRateLimiter() RateLimiter {
+ wg := sync.WaitGroup{}
+ wg.Add(1)
+ return &fakeNeverRateLimiter{
+ wg: wg,
+ }
+}
+
+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()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/framer/framer.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/framer/framer.go
new file mode 100644
index 0000000..066680f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/hash/hash.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/hash/hash.go
new file mode 100644
index 0000000..803f066
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/homedir/homedir.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/homedir/homedir.go
new file mode 100644
index 0000000..4034754
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/homedir/homedir.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 homedir
+
+import (
+ "os"
+ "runtime"
+)
+
+// HomeDir returns the home directory for the current user
+func HomeDir() string {
+ if runtime.GOOS == "windows" {
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/integer/integer.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/integer/integer.go
new file mode 100644
index 0000000..c6ea106
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.pb.go
new file mode 100644
index 0000000..3c2bf4f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.pb.go
@@ -0,0 +1,347 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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/util/intstr/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package intstr is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/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
+
+func (m *IntOrString) Reset() { *m = IntOrString{} }
+func (*IntOrString) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*IntOrString)(nil), "k8s.io.kubernetes.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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.proto
new file mode 100644
index 0000000..dd508e1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/generated.proto
@@ -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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.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
+message IntOrString {
+ optional int64 type = 1;
+
+ optional int32 intVal = 2;
+
+ optional string strVal = 3;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/intstr.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/intstr.go
new file mode 100644
index 0000000..59e7a06
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/intstr/intstr.go
@@ -0,0 +1,147 @@
+/*
+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"
+ "strconv"
+ "strings"
+
+ "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
+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 {
+ 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}
+}
+
+// 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 (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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/json/json.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/json/json.go
new file mode 100644
index 0000000..e8054a1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/line_delimiter.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/line_delimiter.go
new file mode 100644
index 0000000..9f64260
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/line_delimiter.go
@@ -0,0 +1,63 @@
+/*
+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"
+ "io"
+ "strings"
+)
+
+// A Line Delimiter is a filter that will
+type LineDelimiter struct {
+ output io.Writer
+ delimiter []byte
+ buf bytes.Buffer
+}
+
+// NewLineDelimiter allocates a new io.Writer that will split input on lines
+// and bracket each line with the delimiter string. This can be useful in
+// output tests where it is difficult to see and test trailing whitespace.
+func NewLineDelimiter(output io.Writer, delimiter string) *LineDelimiter {
+ return &LineDelimiter{output: output, delimiter: []byte(delimiter)}
+}
+
+// Write writes buf to the LineDelimiter ld. The only errors returned are ones
+// encountered while writing to the underlying output stream.
+func (ld *LineDelimiter) Write(buf []byte) (n int, err error) {
+ return ld.buf.Write(buf)
+}
+
+// Flush all lines up until now. This will assume insert a linebreak at the current point of the stream.
+func (ld *LineDelimiter) Flush() (err error) {
+ lines := strings.Split(ld.buf.String(), "\n")
+ for _, line := range lines {
+ if _, err = ld.output.Write(ld.delimiter); err != nil {
+ return
+ }
+ if _, err = ld.output.Write([]byte(line)); err != nil {
+ return
+ }
+ if _, err = ld.output.Write(ld.delimiter); err != nil {
+ return
+ }
+ if _, err = ld.output.Write([]byte("\n")); err != nil {
+ return
+ }
+ }
+ return
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/logs.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/logs.go
new file mode 100644
index 0000000..ea27f48
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/logs.go
@@ -0,0 +1,61 @@
+/*
+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 (
+ "flag"
+ "log"
+ "time"
+
+ "github.com/golang/glog"
+ "github.com/spf13/pflag"
+ "k8s.io/kubernetes/pkg/util/wait"
+)
+
+var logFlushFreq = pflag.Duration("log-flush-frequency", 5*time.Second, "Maximum number of seconds between log flushes")
+
+// TODO(thockin): This is temporary until we agree on log dirs and put those into each cmd.
+func init() {
+ flag.Set("logtostderr", "true")
+}
+
+// GlogWriter serves as a bridge between the standard log package and the glog package.
+type GlogWriter struct{}
+
+// Write implements the io.Writer interface.
+func (writer GlogWriter) Write(data []byte) (n int, err error) {
+ glog.Info(string(data))
+ return len(data), nil
+}
+
+// InitLogs initializes logs the way we want for kubernetes.
+func InitLogs() {
+ log.SetOutput(GlogWriter{})
+ log.SetFlags(0)
+ // The default glog flush interval is 30 seconds, which is frighteningly long.
+ go wait.Until(glog.Flush, *logFlushFreq, wait.NeverStop)
+}
+
+// FlushLogs flushes logs immediately.
+func FlushLogs() {
+ glog.Flush()
+}
+
+// NewLogger creates a new log.Logger which sends logs to glog.Info.
+func NewLogger(prefix string) *log.Logger {
+ return log.New(GlogWriter{}, prefix, 0)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/http.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/http.go
new file mode 100644
index 0000000..582fb9a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/http.go
@@ -0,0 +1,235 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "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 Dialer(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 Dialer(transport.WrappedRoundTripper())
+ default:
+ return nil, fmt.Errorf("unknown transport type: %v", transport)
+ }
+}
+
+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 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"
+}
+
+// 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 {
+ hdr := req.Header
+ // First check the X-Forwarded-For header for requests via proxy.
+ hdrForwardedFor := hdr.Get("X-Forwarded-For")
+ 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 {
+ return ip
+ }
+ }
+ }
+
+ // Try the X-Real-Ip header.
+ hdrRealIp := hdr.Get("X-Real-Ip")
+ if hdrRealIp != "" {
+ ip := net.ParseIP(hdrRealIp)
+ if ip != nil {
+ return 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 {
+ return net.ParseIP(host)
+ }
+
+ // Fallback if Remote Address was just IP.
+ return net.ParseIP(req.RemoteAddr)
+}
+
+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)
+ }
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/interface.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/interface.go
new file mode 100644
index 0000000..a1e53d2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go
new file mode 100644
index 0000000..6afdbf2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go
@@ -0,0 +1,108 @@
+/*
+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", 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_split.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/port_split.go
new file mode 100644
index 0000000..29c985e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/README.md b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/README.md
new file mode 100644
index 0000000..b0f238a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/README.md
@@ -0,0 +1,17 @@
+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"`
+
+
+
+[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/util/net/sets/README.md?pixel)]()
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go
new file mode 100644
index 0000000..5b6fe93
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/util.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/util.go
new file mode 100644
index 0000000..1348f4d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/net/util.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 net
+
+import (
+ "net"
+ "reflect"
+)
+
+// 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
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go
new file mode 100644
index 0000000..4e70cc6
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/rand/rand.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/rand/rand.go
new file mode 100644
index 0000000..134c152
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/rand/rand.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 rand provides utilities related to randomization.
+package rand
+
+import (
+ "math/rand"
+ "sync"
+ "time"
+)
+
+var letters = []rune("abcdefghijklmnopqrstuvwxyz0123456789")
+var numLetters = len(letters)
+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)
+}
+
+// String generates a random alphanumeric string 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] = letters[Intn(numLetters)]
+ }
+ return string(b)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_linux.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_linux.go
new file mode 100644
index 0000000..a844e4c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_linux.go
@@ -0,0 +1,49 @@
+// +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 util
+
+import (
+ "os"
+ "syscall"
+
+ "github.com/opencontainers/runc/libcontainer/cgroups/fs"
+ "github.com/opencontainers/runc/libcontainer/configs"
+)
+
+// Creates resource-only containerName if it does not already exist and moves
+// the current process to it.
+//
+// containerName must be an absolute container name.
+func RunInResourceContainer(containerName string) error {
+ manager := fs.Manager{
+ Cgroups: &configs.Cgroup{
+ Parent: "/",
+ Name: containerName,
+ Resources: &configs.Resources{
+ AllowAllDevices: true,
+ },
+ },
+ }
+
+ return manager.Apply(os.Getpid())
+}
+
+func ApplyRLimitForSelf(maxOpenFiles uint64) {
+ syscall.Setrlimit(syscall.RLIMIT_NOFILE, &syscall.Rlimit{Max: maxOpenFiles, Cur: maxOpenFiles})
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_unsupported.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_unsupported.go
new file mode 100644
index 0000000..ba861b0
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/resource_container_unsupported.go
@@ -0,0 +1,31 @@
+// +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 util
+
+import (
+ "errors"
+)
+
+func RunInResourceContainer(containerName string) error {
+ return errors.New("resource-only containers unsupported in this platform")
+}
+
+func ApplyRLimitForSelf(maxOpenFiles uint64) error {
+ return errors.New("SetRLimit unsupported in this platform")
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runner.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runner.go
new file mode 100644
index 0000000..9e977ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/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 util
+
+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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go
new file mode 100644
index 0000000..464d3ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.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 runtime
+
+import (
+ "fmt"
+ "github.com/golang/glog"
+ "runtime"
+)
+
+// For testing, bypass HandleCrash.
+var ReallyCrash bool
+
+// PanicHandlers is a list of functions which will be invoked when a panic happens.
+var PanicHandlers = []func(interface{}){logPanic}
+
+//TODO search the public functions
+// 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
+func HandleCrash(additionalHandlers ...func(interface{})) {
+ if ReallyCrash {
+ return
+ }
+ if r := recover(); r != nil {
+ for _, fn := range PanicHandlers {
+ fn(r)
+ }
+ for _, fn := range additionalHandlers {
+ fn(r)
+ }
+ }
+}
+
+// logPanic logs the caller tree when a panic occurs.
+func logPanic(r interface{}) {
+ callers := ""
+ for i := 0; true; i++ {
+ _, file, line, ok := runtime.Caller(i)
+ if !ok {
+ break
+ }
+ callers = callers + fmt.Sprintf("%v:%v\n", file, line)
+ }
+ glog.Errorf("Recovered from panic: %#v (%v)\n%v", r, r, callers)
+}
+
+// ErrorHandlers is a list of functions which will be invoked when an unreturnable
+// error occurs.
+var ErrorHandlers = []func(error){logError}
+
+// 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)
+}
+
+// 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()
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go
new file mode 100644
index 0000000..45f5d4f
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go
@@ -0,0 +1,194 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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)
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go
new file mode 100644
index 0000000..c5e5416
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/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.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+// Package sets has auto-generated set types.
+package sets
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/empty.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/empty.go
new file mode 100644
index 0000000..5654edd
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/empty.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.
+*/
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int.go
new file mode 100644
index 0000000..4b8c331
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int.go
@@ -0,0 +1,194 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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)
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go
new file mode 100644
index 0000000..b6a97e7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go
@@ -0,0 +1,194 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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)
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/string.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/string.go
new file mode 100644
index 0000000..2094b32
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/sets/string.go
@@ -0,0 +1,194 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT 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)
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/string_flag.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/string_flag.go
new file mode 100644
index 0000000..9d6a00a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/string_flag.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 util
+
+// StringFlag is a string flag compatible with flags and pflags that keeps track of whether it had a value supplied or not.
+type StringFlag struct {
+ // If Set has been invoked this value is true
+ provided bool
+ // The exact value provided on the flag
+ value string
+}
+
+func NewStringFlag(defaultVal string) StringFlag {
+ return StringFlag{value: defaultVal}
+}
+
+func (f *StringFlag) Default(value string) {
+ f.value = value
+}
+
+func (f StringFlag) String() string {
+ return f.value
+}
+
+func (f StringFlag) Value() string {
+ return f.value
+}
+
+func (f *StringFlag) Set(value string) error {
+ f.value = value
+ f.provided = true
+
+ return nil
+}
+
+func (f StringFlag) Provided() bool {
+ return f.provided
+}
+
+func (f *StringFlag) Type() string {
+ return "string"
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/template.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/template.go
new file mode 100644
index 0000000..d09d7dc
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/trace.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/trace.go
new file mode 100644
index 0000000..fe93db8
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/trace.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 util
+
+import (
+ "bytes"
+ "fmt"
+ "time"
+
+ "github.com/golang/glog"
+)
+
+type traceStep struct {
+ stepTime time.Time
+ msg string
+}
+
+type Trace struct {
+ name string
+ startTime time.Time
+ steps []traceStep
+}
+
+func NewTrace(name string) *Trace {
+ return &Trace{name, time.Now(), nil}
+}
+
+func (t *Trace) Step(msg string) {
+ if t.steps == nil {
+ // traces almost always have less than 6 steps, do this to avoid more than a single allocation
+ t.steps = make([]traceStep, 0, 6)
+ }
+ t.steps = append(t.steps, traceStep{time.Now(), msg})
+}
+
+func (t *Trace) Log() {
+ endTime := time.Now()
+ var buffer bytes.Buffer
+
+ buffer.WriteString(fmt.Sprintf("Trace %q (started %v):\n", t.name, t.startTime))
+ lastStepTime := t.startTime
+ for _, step := range t.steps {
+ buffer.WriteString(fmt.Sprintf("[%v] [%v] %v\n", step.stepTime.Sub(t.startTime), step.stepTime.Sub(lastStepTime), step.msg))
+ lastStepTime = step.stepTime
+ }
+ buffer.WriteString(fmt.Sprintf("[%v] [%v] END\n", endTime.Sub(t.startTime), endTime.Sub(lastStepTime)))
+ glog.Info(buffer.String())
+}
+
+func (t *Trace) LogIfLong(threshold time.Duration) {
+ if time.Since(t.startTime) >= threshold {
+ t.Log()
+ }
+}
+
+func (t *Trace) TotalTime() time.Duration {
+ return time.Since(t.startTime)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/umask.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/umask.go
new file mode 100644
index 0000000..35ccce5
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/umask_windows.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/umask_windows.go
new file mode 100644
index 0000000..8c1b2cb
--- /dev/null
+++ b/src/kube2msb/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) (old int, err error) {
+ return 0, errors.New("platform and architecture is not supported")
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/util.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/util.go
new file mode 100644
index 0000000..7a94149
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/util.go
@@ -0,0 +1,147 @@
+/*
+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
+}
+
+// borrowed from ioutil.ReadDir
+// ReadDir reads the directory named by dirname and returns
+// a list of directory entries, minus those with lstat errors
+func ReadDirNoExit(dirname string) ([]os.FileInfo, []error, error) {
+ if dirname == "" {
+ dirname = "."
+ }
+
+ f, err := os.Open(dirname)
+ if err != nil {
+ return nil, nil, err
+ }
+ defer f.Close()
+
+ names, err := f.Readdirnames(-1)
+ list := make([]os.FileInfo, 0, len(names))
+ errs := make([]error, 0, len(names))
+ for _, filename := range names {
+ fip, lerr := os.Lstat(dirname + "/" + filename)
+ if os.IsNotExist(lerr) {
+ // File disappeared between readdir + stat.
+ // Just treat it as if it didn't exist.
+ continue
+ }
+
+ list = append(list, fip)
+ errs = append(errs, lerr)
+ }
+
+ return list, errs, nil
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/uuid.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/uuid.go
new file mode 100644
index 0000000..23abe11
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/uuid.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 util
+
+import (
+ "sync"
+
+ "github.com/pborman/uuid"
+ "k8s.io/kubernetes/pkg/types"
+)
+
+var uuidLock sync.Mutex
+var lastUUID uuid.UUID
+
+func NewUUID() types.UID {
+ uuidLock.Lock()
+ defer uuidLock.Unlock()
+ result := uuid.NewUUID()
+ // The UUID package is naive and can generate identical UUIDs if the
+ // time interval is quick enough.
+ // The UUID uses 100 ns increments so it's short enough to actively
+ // wait for a new value.
+ for uuid.Equal(lastUUID, result) == true {
+ result = uuid.NewUUID()
+ }
+ lastUUID = result
+ return types.UID(result.String())
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go
new file mode 100644
index 0000000..b4a6c5c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go
@@ -0,0 +1,228 @@
+/*
+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 (
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ utilerrors "k8s.io/kubernetes/pkg/util/errors"
+)
+
+// 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:
+ var bad string
+ badBytes, err := json.Marshal(v.BadValue)
+ if err != nil {
+ bad = err.Error()
+ } else {
+ bad = string(badBytes)
+ }
+ s = fmt.Sprintf("%s: %s", v.Type, bad)
+ }
+ 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, len(list))
+ for i := range list {
+ errs[i] = list[i]
+ }
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/path.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/field/path.go
new file mode 100644
index 0000000..2efc8ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/validation.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/validation.go
new file mode 100644
index 0000000..6e6a027
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/validation/validation.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 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 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, RegexError(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(qualifiedNameFmt, "MyName", "my.name", "123-abc"))
+ }
+ return errs
+}
+
+const labelValueFmt string = "(" + qualifiedNameFmt + ")?"
+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(labelValueFmt, "MyValue", "my_value", "12345"))
+ }
+ return errs
+}
+
+const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
+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(dns1123LabelFmt, "my-name", "123-abc"))
+ }
+ return errs
+}
+
+const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*"
+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(dns1123SubdomainFmt, "example.com"))
+ }
+ return errs
+}
+
+const dns952LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
+const DNS952LabelMaxLength int = 24
+
+var dns952LabelRegexp = regexp.MustCompile("^" + dns952LabelFmt + "$")
+
+// IsDNS952Label tests for a string that conforms to the definition of a label in
+// DNS (RFC 952).
+func IsDNS952Label(value string) []string {
+ var errs []string
+ if len(value) > DNS952LabelMaxLength {
+ errs = append(errs, MaxLenError(DNS952LabelMaxLength))
+ }
+ if !dns952LabelRegexp.MatchString(value) {
+ errs = append(errs, RegexError(dns952LabelFmt, "my-name", "abc-123"))
+ }
+ return errs
+}
+
+const cIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*"
+
+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(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 (a-z)")
+ }
+ 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]+%"
+
+var percentRegexp = regexp.MustCompile("^" + percentFmt + "$")
+
+func IsValidPercent(percent string) []string {
+ if !percentRegexp.MatchString(percent) {
+ return []string{RegexError(percentFmt, "1%", "93%")}
+ }
+ return nil
+}
+
+const httpHeaderNameFmt string = "[-A-Za-z0-9]+"
+
+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(httpHeaderNameFmt, "X-Header-Name")}
+ }
+ return nil
+}
+
+const configMapKeyFmt = "\\.?" + dns1123SubdomainFmt
+
+var configMapKeyRegexp = regexp.MustCompile("^" + configMapKeyFmt + "$")
+
+// IsConfigMapKey tests for a string that conforms to the definition of a
+// subdomain in DNS (RFC 1123), except that a leading dot is allowed
+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(configMapKeyFmt, "key.name"))
+ }
+ 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(fmt string, examples ...string) string {
+ s := "must match the regex " + fmt
+ if len(examples) == 0 {
+ return s
+ }
+ s += " (e.g. "
+ for i := range examples {
+ if i > 0 {
+ s += " or "
+ }
+ s += "'" + examples[i] + "'"
+ }
+ return s + ")"
+}
+
+// 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go
new file mode 100644
index 0000000..ff89dc1
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go
new file mode 100644
index 0000000..bd4543e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go
@@ -0,0 +1,268 @@
+/*
+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/kubernetes/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 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, 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.
+// Catches any panics, and keeps going. f may not be invoked if
+// stop channel is already closed. Pass NeverStop to Until if you
+// don't want it stop.
+func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
+ select {
+ case <-stopCh:
+ return
+ default:
+ }
+
+ for {
+ jitteredPeriod := period
+ if jitterFactor > 0.0 {
+ jitteredPeriod = Jitter(period, jitterFactor)
+ }
+
+ var t *time.Timer
+ if !sliding {
+ t = time.NewTimer(jitteredPeriod)
+ }
+
+ func() {
+ defer runtime.HandleCrash()
+ f()
+ }()
+
+ if sliding {
+ t = time.NewTimer(jitteredPeriod)
+ } else {
+ // The timer we created could already have fired, so be
+ // careful and check stopCh first.
+ select {
+ case <-stopCh:
+ return
+ default:
+ }
+ }
+
+ select {
+ case <-stopCh:
+ return
+ case <-t.C:
+ }
+ }
+}
+
+// Jitter returns a time.Duration between duration and duration + maxFactor * duration,
+// to allow 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 is parameters applied to a Backoff function.
+type Backoff struct {
+ Duration time.Duration
+ Factor float64
+ Jitter float64
+ Steps int
+}
+
+// ExponentialBackoff repeats a condition check up to steps times, increasing the wait
+// by multipling 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. condition will always be invoked at least once but 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.
+// Poll always waits the interval before the first check of the condition.
+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 is identical to Poll, except that it performs the first check
+// immediately, not waiting interval beforehand.
+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 polls forever.
+func PollInfinite(interval time.Duration, condition ConditionFunc) error {
+ done := make(chan struct{})
+ defer close(done)
+ return WaitFor(poller(interval, 0), condition, done)
+}
+
+// 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 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 close the channel.
+// Over very short intervals you may receive no ticks before
+// the channel is closed. If timeout is 0, the channel
+// will never be closed.
+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
+ })
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go
new file mode 100644
index 0000000..6a9f05a
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go
@@ -0,0 +1,247 @@
+/*
+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 {
+ scanner *bufio.Scanner
+}
+
+// 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 {
+ scanner := bufio.NewScanner(r)
+ scanner.Split(splitYAMLDocument)
+ return &YAMLToJSONDecoder{
+ scanner: scanner,
+ }
+}
+
+// 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 {
+ if d.scanner.Scan() {
+ data, err := yaml.YAMLToJSON(d.scanner.Bytes())
+ if err != nil {
+ return err
+ }
+ return json.Unmarshal(data, into)
+ }
+ err := d.scanner.Err()
+ if err == nil {
+ err = io.EOF
+ }
+ 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---"
+
+// 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
+}
+
+// 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, isJSON := GuessJSONStream(d.r, d.bufferSize)
+ if isJSON {
+ glog.V(4).Infof("decoding stream as JSON")
+ d.decoder = json.NewDecoder(buffer)
+ } 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)
+ start := strings.LastIndex(js[:syntax.Offset], "\n") + 1
+ line := strings.Count(js[:start], "\n")
+ return fmt.Errorf("json: line %d: %s", line, syntax.Error())
+ }
+ }
+ return 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, bool) {
+ buffer := bufio.NewReaderSize(r, size)
+ b, _ := buffer.Peek(size)
+ return buffer, 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/base.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/base.go
new file mode 100644
index 0000000..475bd06
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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 = "" // major version, always numeric
+ gitMinor string = "" // minor version, numeric possibly followed by "+"
+
+ // semantic version, dervied 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 = "v0.0.0-master+$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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/doc.go
new file mode 100644
index 0000000..ccedec7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/semver.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/semver.go
new file mode 100644
index 0000000..1f4067e
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/semver.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 version
+
+import (
+ "strings"
+ "unicode"
+
+ "github.com/blang/semver"
+ "github.com/golang/glog"
+)
+
+func Parse(gitversion string) (semver.Version, error) {
+ // optionally trim leading spaces then one v
+ var seen bool
+ gitversion = strings.TrimLeftFunc(gitversion, func(ch rune) bool {
+ if seen {
+ return false
+ }
+ if ch == 'v' {
+ seen = true
+ return true
+ }
+ return unicode.IsSpace(ch)
+ })
+
+ return semver.Make(gitversion)
+}
+
+func MustParse(gitversion string) semver.Version {
+ v, err := Parse(gitversion)
+ if err != nil {
+ glog.Fatalf("failed to parse semver from gitversion %q: %v", gitversion, err)
+ }
+ return v
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/version.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/version.go
new file mode 100644
index 0000000..1e93132
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/version/version.go
@@ -0,0 +1,76 @@
+/*
+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"
+
+ "github.com/prometheus/client_golang/prometheus"
+)
+
+// 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"`
+}
+
+// Get returns the overall codebase version. It's for detecting
+// what code a binary was built from.
+func Get() Info {
+ // These variables typically come from -ldflags settings and in
+ // their absence fallback to the settings in pkg/version/base.go
+ return 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),
+ }
+}
+
+// String returns info as a human-friendly version string.
+func (info Info) String() string {
+ return info.GitVersion
+}
+
+func init() {
+ buildInfo := prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Name: "kubernetes_build_info",
+ Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.",
+ },
+ []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"},
+ )
+ info := Get()
+ buildInfo.WithLabelValues(info.Major, info.Minor, info.GitVersion, info.GitCommit, info.GitTreeState, info.BuildDate, info.GoVersion, info.Compiler, info.Platform).Set(1)
+
+ prometheus.MustRegister(buildInfo)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/doc.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/doc.go
new file mode 100644
index 0000000..5fde5e7
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/filter.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/filter.go
new file mode 100644
index 0000000..3ca27f2
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/mux.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/mux.go
new file mode 100644
index 0000000..ec6de05
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// 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() unversioned.ObjectKind {
+ return unversioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher.go
new file mode 100644
index 0000000..26cf61d
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/net"
+ utilruntime "k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/until.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/until.go
new file mode 100644
index 0000000..4259f51
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/until.go
@@ -0,0 +1,82 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES 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 (
+ "time"
+
+ "k8s.io/kubernetes/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)
+
+// 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.
+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)
+ 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 {
+ break
+ }
+ }
+ ConditionSucceeded:
+ for {
+ select {
+ case event, ok := <-ch:
+ if !ok {
+ return lastEvent, wait.ErrWaitTimeout
+ }
+ 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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/decoder.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/decoder.go
new file mode 100644
index 0000000..e586527
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/decoder.go
@@ -0,0 +1,71 @@
+/*
+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"
+
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer/streaming"
+ "k8s.io/kubernetes/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 Event
+ res, _, err := d.decoder.Decode(nil, &got)
+ if err != nil {
+ return "", nil, err
+ }
+ if res != &got {
+ return "", nil, fmt.Errorf("unable to decode to versioned.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/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/encoder.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/encoder.go
new file mode 100644
index 0000000..df23e0b
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/encoder.go
@@ -0,0 +1,51 @@
+/*
+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"
+
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/runtime/serializer/streaming"
+ "k8s.io/kubernetes/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.
+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(&Event{string(event.Type), runtime.RawExtension{Raw: json.RawMessage(data)}})
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.pb.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.pb.go
new file mode 100644
index 0000000..d2576eb
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.pb.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.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/watch/versioned/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package versioned is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/watch/versioned/generated.proto
+
+ It has these top-level messages:
+ Event
+*/
+package versioned
+
+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
+
+func (m *Event) Reset() { *m = Event{} }
+func (m *Event) String() string { return proto.CompactTextString(m) }
+func (*Event) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*Event)(nil), "k8s.io.kubernetes.pkg.watch.versioned.Event")
+}
+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(len(m.Type)))
+ i += copy(data[i:], m.Type)
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Object.Size()))
+ n1, err := m.Object.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ 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 *Event) 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 (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 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")
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.proto b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.proto
new file mode 100644
index 0000000..8d55065
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/generated.proto
@@ -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.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.watch.versioned;
+
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "versioned";
+
+// Event represents a single event to a watched resource.
+//
+// +protobuf=true
+message Event {
+ 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: *api.Status is recommended; other types may make sense
+ // depending on context.
+ optional k8s.io.kubernetes.pkg.runtime.RawExtension object = 2;
+}
+
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/register.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/register.go
new file mode 100644
index 0000000..e90a021
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/register.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 versioned
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/conversion"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/watch"
+)
+
+// WatchEventKind is name reserved for serializing watch events.
+const WatchEventKind = "WatchEvent"
+
+// AddToGroupVersion registers the watch external and internal kinds with the scheme, and ensures the proper
+// conversions are in place.
+func AddToGroupVersion(scheme *runtime.Scheme, groupVersion unversioned.GroupVersion) {
+ scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &Event{})
+ scheme.AddKnownTypeWithName(
+ unversioned.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind),
+ &InternalEvent{},
+ )
+ 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,
+ )
+}
+
+func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *Event, 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 *Event, s conversion.Scope) error {
+ return Convert_watch_Event_to_versioned_Event((*watch.Event)(in), out, s)
+}
+
+func Convert_versioned_Event_to_watch_Event(in *Event, 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 *Event, out *InternalEvent, s conversion.Scope) error {
+ return Convert_versioned_Event_to_watch_Event(in, (*watch.Event)(out), s)
+}
+
+// InternalEvent makes watch.Event versioned
+type InternalEvent watch.Event
+
+func (e *InternalEvent) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind }
+func (e *Event) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind }
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/types.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/types.go
new file mode 100644
index 0000000..f8e968c
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/versioned/types.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 versioned contains the versioned types for watch. This is the first
+// serialization version unless otherwise noted.
+package versioned
+
+import (
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// Event represents a single event to a watched resource.
+//
+// +protobuf=true
+type Event 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: *api.Status is recommended; other types may make sense
+ // depending on context.
+ Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"`
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/watch.go b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/watch.go
new file mode 100644
index 0000000..96b2fe3
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/pkg/watch/watch.go
@@ -0,0 +1,137 @@
+/*
+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/kubernetes/pkg/runtime"
+)
+
+// 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"
+)
+
+// 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),
+ }
+}
+
+// Stop implements Interface.Stop().
+func (f *FakeWatcher) Stop() {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ close(f.result)
+ f.Stopped = true
+ }
+}
+
+// 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}
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go
new file mode 100644
index 0000000..32cbb36
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go
@@ -0,0 +1,106 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package gcp
+
+import (
+ "net/http"
+ "time"
+
+ "github.com/golang/glog"
+ "golang.org/x/net/context"
+ "golang.org/x/oauth2"
+ "golang.org/x/oauth2/google"
+
+ "k8s.io/kubernetes/pkg/client/restclient"
+)
+
+func init() {
+ if err := restclient.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil {
+ glog.Fatalf("Failed to register gcp auth plugin: %v", err)
+ }
+}
+
+type gcpAuthProvider struct {
+ tokenSource oauth2.TokenSource
+ persister restclient.AuthProviderConfigPersister
+}
+
+func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) {
+ ts, err := newCachedTokenSource(gcpConfig["access-token"], gcpConfig["expiry"], persister)
+ if err != nil {
+ return nil, err
+ }
+ return &gcpAuthProvider{ts, persister}, nil
+}
+
+func (g *gcpAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper {
+ return &oauth2.Transport{
+ Source: g.tokenSource,
+ Base: rt,
+ }
+}
+
+func (g *gcpAuthProvider) Login() error { return nil }
+
+type cachedTokenSource struct {
+ source oauth2.TokenSource
+ accessToken string
+ expiry time.Time
+ persister restclient.AuthProviderConfigPersister
+}
+
+func newCachedTokenSource(accessToken, expiry string, persister restclient.AuthProviderConfigPersister) (*cachedTokenSource, error) {
+ var expiryTime time.Time
+ if parsedTime, err := time.Parse(time.RFC3339Nano, expiry); err == nil {
+ expiryTime = parsedTime
+ }
+ ts, err := google.DefaultTokenSource(context.Background(), "https://www.googleapis.com/auth/cloud-platform")
+ if err != nil {
+ return nil, err
+ }
+ return &cachedTokenSource{
+ source: ts,
+ accessToken: accessToken,
+ expiry: expiryTime,
+ persister: persister,
+ }, nil
+}
+
+func (t *cachedTokenSource) Token() (*oauth2.Token, error) {
+ tok := &oauth2.Token{
+ AccessToken: t.accessToken,
+ TokenType: "Bearer",
+ Expiry: t.expiry,
+ }
+ if tok.Valid() && !tok.Expiry.IsZero() {
+ return tok, nil
+ }
+ tok, err := t.source.Token()
+ if err != nil {
+ return nil, err
+ }
+ if t.persister != nil {
+ cached := map[string]string{
+ "access-token": tok.AccessToken,
+ "expiry": tok.Expiry.Format(time.RFC3339Nano),
+ }
+ if err := t.persister.Persist(cached); err != nil {
+ glog.V(4).Infof("Failed to persist token: %v", err)
+ }
+ }
+ return tok, nil
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS
new file mode 100644
index 0000000..ecf3349
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS
@@ -0,0 +1,2 @@
+assignees:
+ - bobbyrullo
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go
new file mode 100644
index 0000000..690a452
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go
@@ -0,0 +1,270 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package oidc
+
+import (
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "net/http"
+ "strings"
+ "time"
+
+ "github.com/coreos/go-oidc/jose"
+ "github.com/coreos/go-oidc/oauth2"
+ "github.com/coreos/go-oidc/oidc"
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/client/restclient"
+ "k8s.io/kubernetes/pkg/util/wait"
+)
+
+const (
+ cfgIssuerUrl = "idp-issuer-url"
+ cfgClientID = "client-id"
+ cfgClientSecret = "client-secret"
+ cfgCertificateAuthority = "idp-certificate-authority"
+ cfgCertificateAuthorityData = "idp-certificate-authority-data"
+ cfgExtraScopes = "extra-scopes"
+ cfgIDToken = "id-token"
+ cfgRefreshToken = "refresh-token"
+)
+
+var (
+ backoff = wait.Backoff{
+ Duration: 1 * time.Second,
+ Factor: 2,
+ Jitter: .1,
+ Steps: 5,
+ }
+)
+
+func init() {
+ if err := restclient.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil {
+ glog.Fatalf("Failed to register oidc auth plugin: %v", err)
+ }
+}
+
+func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) {
+ issuer := cfg[cfgIssuerUrl]
+ if issuer == "" {
+ return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl)
+ }
+
+ clientID := cfg[cfgClientID]
+ if clientID == "" {
+ return nil, fmt.Errorf("Must provide %s", cfgClientID)
+ }
+
+ clientSecret := cfg[cfgClientSecret]
+ if clientSecret == "" {
+ return nil, fmt.Errorf("Must provide %s", cfgClientSecret)
+ }
+
+ var certAuthData []byte
+ var err error
+ if cfg[cfgCertificateAuthorityData] != "" {
+ certAuthData, err = base64.StdEncoding.DecodeString(cfg[cfgCertificateAuthorityData])
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ clientConfig := restclient.Config{
+ TLSClientConfig: restclient.TLSClientConfig{
+ CAFile: cfg[cfgCertificateAuthority],
+ CAData: certAuthData,
+ },
+ }
+
+ trans, err := restclient.TransportFor(&clientConfig)
+ if err != nil {
+ return nil, err
+ }
+ hc := &http.Client{Transport: trans}
+
+ providerCfg, err := oidc.FetchProviderConfig(hc, strings.TrimSuffix(issuer, "/"))
+ if err != nil {
+ return nil, fmt.Errorf("error fetching provider config: %v", err)
+ }
+
+ scopes := strings.Split(cfg[cfgExtraScopes], ",")
+ oidcCfg := oidc.ClientConfig{
+ HTTPClient: hc,
+ Credentials: oidc.ClientCredentials{
+ ID: clientID,
+ Secret: clientSecret,
+ },
+ ProviderConfig: providerCfg,
+ Scope: append(scopes, oidc.DefaultScope...),
+ }
+
+ client, err := oidc.NewClient(oidcCfg)
+ if err != nil {
+ return nil, fmt.Errorf("error creating OIDC Client: %v", err)
+ }
+
+ oClient := &oidcClient{client}
+
+ var initialIDToken jose.JWT
+ if cfg[cfgIDToken] != "" {
+ initialIDToken, err = jose.ParseJWT(cfg[cfgIDToken])
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return &oidcAuthProvider{
+ initialIDToken: initialIDToken,
+ refresher: &idTokenRefresher{
+ client: oClient,
+ cfg: cfg,
+ persister: persister,
+ },
+ }, nil
+}
+
+type oidcAuthProvider struct {
+ refresher *idTokenRefresher
+ initialIDToken jose.JWT
+}
+
+func (g *oidcAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper {
+ at := &oidc.AuthenticatedTransport{
+ TokenRefresher: g.refresher,
+ RoundTripper: rt,
+ }
+ at.SetJWT(g.initialIDToken)
+ return &roundTripper{
+ wrapped: at,
+ refresher: g.refresher,
+ }
+}
+
+func (g *oidcAuthProvider) Login() error {
+ return errors.New("not yet implemented")
+}
+
+type OIDCClient interface {
+ refreshToken(rt string) (oauth2.TokenResponse, error)
+ verifyJWT(jwt jose.JWT) error
+}
+
+type roundTripper struct {
+ refresher *idTokenRefresher
+ wrapped *oidc.AuthenticatedTransport
+}
+
+func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ var res *http.Response
+ var err error
+ firstTime := true
+ wait.ExponentialBackoff(backoff, func() (bool, error) {
+ if !firstTime {
+ var jwt jose.JWT
+ jwt, err = r.refresher.Refresh()
+ if err != nil {
+ return true, nil
+ }
+ r.wrapped.SetJWT(jwt)
+ } else {
+ firstTime = false
+ }
+
+ res, err = r.wrapped.RoundTrip(req)
+ if err != nil {
+ return true, nil
+ }
+ if res.StatusCode == http.StatusUnauthorized {
+ return false, nil
+ }
+ return true, nil
+ })
+ return res, err
+}
+
+type idTokenRefresher struct {
+ cfg map[string]string
+ client OIDCClient
+ persister restclient.AuthProviderConfigPersister
+ intialIDToken jose.JWT
+}
+
+func (r *idTokenRefresher) Verify(jwt jose.JWT) error {
+ claims, err := jwt.Claims()
+ if err != nil {
+ return err
+ }
+
+ now := time.Now()
+ exp, ok, err := claims.TimeClaim("exp")
+ switch {
+ case err != nil:
+ return fmt.Errorf("failed to parse 'exp' claim: %v", err)
+ case !ok:
+ return errors.New("missing required 'exp' claim")
+ case exp.Before(now):
+ return fmt.Errorf("token already expired at: %v", exp)
+ }
+
+ return nil
+}
+
+func (r *idTokenRefresher) Refresh() (jose.JWT, error) {
+ rt, ok := r.cfg[cfgRefreshToken]
+ if !ok {
+ return jose.JWT{}, errors.New("No valid id-token, and cannot refresh without refresh-token")
+ }
+
+ tokens, err := r.client.refreshToken(rt)
+ if err != nil {
+ return jose.JWT{}, fmt.Errorf("could not refresh token: %v", err)
+ }
+ jwt, err := jose.ParseJWT(tokens.IDToken)
+ if err != nil {
+ return jose.JWT{}, err
+ }
+
+ if tokens.RefreshToken != "" && tokens.RefreshToken != rt {
+ r.cfg[cfgRefreshToken] = tokens.RefreshToken
+ }
+ r.cfg[cfgIDToken] = jwt.Encode()
+
+ err = r.persister.Persist(r.cfg)
+ if err != nil {
+ return jose.JWT{}, fmt.Errorf("could not perist new tokens: %v", err)
+ }
+
+ return jwt, r.client.verifyJWT(jwt)
+}
+
+type oidcClient struct {
+ client *oidc.Client
+}
+
+func (o *oidcClient) refreshToken(rt string) (oauth2.TokenResponse, error) {
+ oac, err := o.client.OAuthClient()
+ if err != nil {
+ return oauth2.TokenResponse{}, err
+ }
+
+ return oac.RequestToken(oauth2.GrantTypeRefreshToken, rt)
+}
+
+func (o *oidcClient) verifyJWT(jwt jose.JWT) error {
+ return o.client.VerifyJWT(jwt)
+}
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go
new file mode 100644
index 0000000..17d3ad4
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.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.
+*/
+
+package plugins
+
+import (
+ // Initialize all known client auth plugins.
+ _ "k8s.io/kubernetes/plugin/pkg/client/auth/gcp"
+ _ "k8s.io/kubernetes/plugin/pkg/client/auth/oidc"
+)
diff --git a/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE b/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE
new file mode 100644
index 0000000..7448756
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS b/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS
new file mode 100644
index 0000000..7330990
--- /dev/null
+++ b/src/kube2msb/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/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/reflect/deep_equal.go b/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/reflect/deep_equal.go
new file mode 100644
index 0000000..9e45dbe
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/reflect/type.go b/src/kube2msb/vendor/k8s.io/kubernetes/third_party/forked/golang/reflect/type.go
new file mode 100644
index 0000000..67957ee
--- /dev/null
+++ b/src/kube2msb/vendor/k8s.io/kubernetes/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
+}