aboutsummaryrefslogtreecommitdiffstats
path: root/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-09-04 15:00:54 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-09-04 15:06:21 +0800
commit43dac0bc4302fed79eaeb661723ca584a9c0496a (patch)
treea78f60300d73f0a69ed12e946d3fe4580455d8ba /kube2msb/src/vendor/k8s.io/kubernetes/pkg/api
parenta7837a0ac51704003c6aacba2dacb8e64f681622 (diff)
restructure the source directory
Issue-ID: OOM-61 Change-Id: Ib6f633d517ad197bfdbca59b374cdad2f1ed897e Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'kube2msb/src/vendor/k8s.io/kubernetes/pkg/api')
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/OWNERS6
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/context.go121
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/conversion.go160
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go2950
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/doc.go24
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go238
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go18
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go456
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/field_constants.go38
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/generate.go64
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/helpers.go502
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/install/install.go251
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/mapper.go60
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta.go129
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go19
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go72
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/help.go134
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go180
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go567
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go30
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go200
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go173
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go520
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/node_example.json49
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod/util.go61
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod_example.json102
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/ref.go130
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/register.go115
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json82
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go115
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go298
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go46
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto93
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/math.go327
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go777
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go284
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go95
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go198
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go209
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go28
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/util.go68
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.generated.go59756
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.go2891
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go288
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go19
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go47
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go4212
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto377
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go287
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go154
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go62
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go25
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go160
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go85
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go460
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go208
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go74
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go30
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go48
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go579
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go6820
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go2924
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go301
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go21
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go34797
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto2935
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go85
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/register.go94
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go60001
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.go3329
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go1742
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go19
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/events.go45
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/name.go66
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go370
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go3193
76 files changed, 0 insertions, 196493 deletions
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/OWNERS b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/OWNERS
deleted file mode 100644
index d28472e..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/OWNERS
+++ /dev/null
@@ -1,6 +0,0 @@
-assignees:
- - bgrant0607
- - erictune
- - lavalamp
- - smarterclayton
- - thockin
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/context.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/context.go
deleted file mode 100644
index 096144b..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/context.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/conversion.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/conversion.go
deleted file mode 100644
index 07585d8..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/conversion.go
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go
deleted file mode 100644
index 340f365..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/deep_copy_generated.go
+++ /dev/null
@@ -1,2950 +0,0 @@
-// +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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/doc.go
deleted file mode 100644
index 1507a88..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/doc.go
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go
deleted file mode 100644
index 792a253..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/endpoints/util.go
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go
deleted file mode 100644
index 58751ed..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go
deleted file mode 100644
index a51fe94..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/errors/errors.go
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/field_constants.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/field_constants.go
deleted file mode 100644
index 5ead0f1..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/field_constants.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/generate.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/generate.go
deleted file mode 100644
index 19379d3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/generate.go
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/helpers.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/helpers.go
deleted file mode 100644
index ca873b3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/helpers.go
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/install/install.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/install/install.go
deleted file mode 100644
index 937920d..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/install/install.go
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/mapper.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/mapper.go
deleted file mode 100644
index 60addca..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/mapper.go
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta.go
deleted file mode 100644
index 7779359..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta.go
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go
deleted file mode 100644
index a3b18a5..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go
deleted file mode 100644
index dc4ec07..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/help.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/help.go
deleted file mode 100644
index 0d733a5..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/help.go
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go
deleted file mode 100644
index 34c51e3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go
deleted file mode 100644
index 876aa4f..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go
deleted file mode 100644
index 41e6596..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/metatypes/types.go
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go
deleted file mode 100644
index 790795a..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go
deleted file mode 100644
index 1e44e45..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go
deleted file mode 100644
index bf2567e..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/node_example.json b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/node_example.json
deleted file mode 100644
index 2601834..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/node_example.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod/util.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod/util.go
deleted file mode 100644
index cd6f9fb..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod/util.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod_example.json b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod_example.json
deleted file mode 100644
index 8284240..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/pod_example.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/ref.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/ref.go
deleted file mode 100644
index b864593..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/ref.go
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/register.go
deleted file mode 100644
index 6b1ed75..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/register.go
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json
deleted file mode 100644
index 5c3c4fe..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/replication_controller_example.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go
deleted file mode 100644
index 14983b2..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/requestcontext.go
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go
deleted file mode 100644
index 2d3012c..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/amount.go
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go
deleted file mode 100644
index f091cde..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.pb.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto
deleted file mode 100644
index bdc091d..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/generated.proto
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/math.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/math.go
deleted file mode 100644
index 887ac74..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/math.go
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go
deleted file mode 100644
index 823dd5e..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go
+++ /dev/null
@@ -1,777 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go
deleted file mode 100644
index 74dfb4e..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/quantity_proto.go
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go
deleted file mode 100644
index 55e177b..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/scale_int.go
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go
deleted file mode 100644
index 5ed7abe..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go
deleted file mode 100644
index 2c683da..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/resource_helpers.go
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go
deleted file mode 100644
index ee275d3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/annotations.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/util.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/util.go
deleted file mode 100644
index 6f0e14e..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/service/util.go
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.generated.go
deleted file mode 100644
index 67d3dbc..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.generated.go
+++ /dev/null
@@ -1,59756 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.go
deleted file mode 100644
index 7225e8f..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/types.go
+++ /dev/null
@@ -1,2891 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go
deleted file mode 100644
index 77f5b66..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/deep_copy_generated.go
+++ /dev/null
@@ -1,288 +0,0 @@
-// +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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go
deleted file mode 100644
index d0ffc33..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go
deleted file mode 100644
index ed54e51..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/duration.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go
deleted file mode 100644
index f0d7147..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.pb.go
+++ /dev/null
@@ -1,4212 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto
deleted file mode 100644
index bb4bf4a..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/generated.proto
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go
deleted file mode 100644
index 8f74789..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/group_version.go
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go
deleted file mode 100644
index fbbff00..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/helpers.go
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go
deleted file mode 100644
index 48009da..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/meta.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go
deleted file mode 100644
index 9af0566..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/register.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go
deleted file mode 100644
index 73b00f2..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time.go
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go
deleted file mode 100644
index ba25e91..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/time_proto.go
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go
deleted file mode 100644
index f396487..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types.go
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go
deleted file mode 100644
index cdd31eb..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go
deleted file mode 100644
index ecb968b..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/validation/validation.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go
deleted file mode 100644
index 318c6ee..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/unversioned/well_known_labels.go
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go
deleted file mode 100644
index fea2f17..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
deleted file mode 100644
index 642b1bc..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go
deleted file mode 100644
index a9cb349..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go
+++ /dev/null
@@ -1,6820 +0,0 @@
-// +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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go
deleted file mode 100644
index 9054da3..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/deep_copy_generated.go
+++ /dev/null
@@ -1,2924 +0,0 @@
-// +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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
deleted file mode 100644
index 5d6323f..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go
deleted file mode 100644
index 8849ee1..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go
deleted file mode 100644
index 16ac125..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go
+++ /dev/null
@@ -1,34797 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto
deleted file mode 100644
index 060b6ca..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto
+++ /dev/null
@@ -1,2935 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go
deleted file mode 100644
index d5ba042..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/register.go
deleted file mode 100644
index 8c625b8..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/register.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go
deleted file mode 100644
index 93c45da..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go
+++ /dev/null
@@ -1,60001 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.go
deleted file mode 100644
index 42a0b98..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types.go
+++ /dev/null
@@ -1,3329 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go
deleted file mode 100644
index c5eb00d..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,1742 +0,0 @@
-/*
-Copyright 2016 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go
deleted file mode 100644
index f17a15c..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/events.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/events.go
deleted file mode 100644
index 754cf88..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/events.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/name.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/name.go
deleted file mode 100644
index 1358e6e..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/name.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2015 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go
deleted file mode 100644
index f6a4d07..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go
deleted file mode 100644
index 3854004..0000000
--- a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go
+++ /dev/null
@@ -1,3193 +0,0 @@
-/*
-Copyright 2014 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES 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
-}